mirror of https://github.com/rwf2/Rocket.git
Inline macro docs into core crate.
This commit is contained in:
parent
39b1f2f8d0
commit
32e86c3b69
|
@ -93,10 +93,7 @@
|
|||
//! [testing chapter of the guide]: https://rocket.rs/v0.5/guide/testing/#testing
|
||||
|
||||
#[allow(unused_imports)] #[macro_use] extern crate rocket_codegen;
|
||||
// FIXME(rustdoc): We should be able to doc(inline) and not doc the
|
||||
// rocket_codegen crate at all. Alas, doc-inlining will currently 1) show hidden
|
||||
// proc-macros, and 2) result in proc-macros pointing to the wrong docs.
|
||||
#[doc(hidden)] pub use rocket_codegen::*;
|
||||
pub use rocket_codegen::*;
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
#[macro_use] extern crate pear;
|
||||
|
|
|
@ -23,15 +23,32 @@ function relative() {
|
|||
fi
|
||||
}
|
||||
|
||||
function future_date() {
|
||||
local days_in_future=`[[ -z "$1" ]] && echo "0" || echo "$1"`
|
||||
if date -v+1d +%Y-%m-%d > /dev/null 2>&1; then
|
||||
echo $(date -v+${days_in_future}d +%Y-%m-%d)
|
||||
elif date -d "+1 day" > /dev/null 2>&1; then
|
||||
echo $(date '+%Y-%m-%d' -d "+${days_in_future} days")
|
||||
else
|
||||
echo "Error: need a 'date' cmd that accepts -v (BSD) or -d (GNU)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Versioning information. These are toggled as versions change.
|
||||
ROCKET_VERSION="0.5.0-dev"
|
||||
CURRENT_RELEASE=false
|
||||
PRE_RELEASE=true
|
||||
|
||||
# A generated codename for this version. Use the git branch for pre-releases.
|
||||
case $PRE_RELEASE in
|
||||
true) VERSION_CODENAME="$(git branch --show-current)" ;;
|
||||
false) VERSION_CODENAME="$(echo "${ROCKET_VERSION}" | cut -d'.' -f1-2)" ;;
|
||||
true)
|
||||
VERSION_CODENAME="$(git branch --show-current)"
|
||||
ROCKET_VERSION="${VERSION_CODENAME}-$(future_date)"
|
||||
;;
|
||||
false)
|
||||
ROCKET_VERSION="0.5.0-dev"
|
||||
VERSION_CODENAME="$(echo "${ROCKET_VERSION}" | cut -d'.' -f1-2)"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Root of workspace-like directories.
|
||||
|
@ -77,4 +94,5 @@ if [ "${1}" = "-p" ]; then
|
|||
echo "EXAMPLES_DIR: ${EXAMPLES_DIR}"
|
||||
echo "DOC_DIR: ${DOC_DIR}"
|
||||
echo "ALL_PROJECT_DIRS: ${ALL_PROJECT_DIRS[*]}"
|
||||
echo "date(): $(future_date)"
|
||||
fi
|
||||
|
|
|
@ -20,7 +20,7 @@ fi
|
|||
echo ":::: Generating the docs..."
|
||||
pushd "${PROJECT_ROOT}" > /dev/null 2>&1
|
||||
RUSTDOCFLAGS="-Z unstable-options --crate-version ${ROCKET_VERSION}" \
|
||||
cargo doc -p rocket -p rocket_contrib -p rocket_codegen --no-deps --all-features
|
||||
cargo doc -p rocket -p rocket_contrib --no-deps --all-features
|
||||
popd > /dev/null 2>&1
|
||||
|
||||
# Blank index, for redirection.
|
||||
|
|
|
@ -41,7 +41,6 @@ function ensure_tab_free() {
|
|||
|
||||
# Ensures there are no files with trailing whitespace.
|
||||
function ensure_trailing_whitespace_free() {
|
||||
# FIXME: Some .stderr files contain trailing spaces
|
||||
local matches=$(git grep -E -I "\s+$" "${PROJECT_ROOT}" | grep -v -F '.stderr:')
|
||||
if ! [ -z "${matches}" ]; then
|
||||
echo "Trailing whitespace was found in the following:"
|
||||
|
|
Loading…
Reference in New Issue