Don't fail documentation without the default feature (#5180)

This commit fixes `cargo doc -p wasmtime --no-default-features` where
previously it would fail with many broken doc links because the crate is
missing many items that links refer to. Instead they're emitted as
warnings now which while noisy should prevent the build from being
entirely usable at least.
This commit is contained in:
Alex Crichton
2022-11-02 11:59:01 -05:00
committed by GitHub
parent 2afaac5181
commit e0c8a7f477

View File

@@ -379,12 +379,16 @@
//! # } //! # }
//! ``` //! ```
#![allow(unknown_lints)] #![deny(missing_docs)]
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
#![doc(test(attr(deny(warnings))))] #![doc(test(attr(deny(warnings))))]
#![doc(test(attr(allow(dead_code, unused_variables, unused_mut))))] #![doc(test(attr(allow(dead_code, unused_variables, unused_mut))))]
#![cfg_attr(nightlydoc, feature(doc_cfg))] #![cfg_attr(nightlydoc, feature(doc_cfg))]
#![cfg_attr(not(feature = "default"), allow(dead_code, unused_imports))] #![cfg_attr(not(feature = "default"), allow(dead_code, unused_imports))]
// Allow broken links when the default features is disabled because most of our
// documentation is written for the "one build" of the `main` branch which has
// most features enabled. This will present warnings in stripped-down doc builds
// and will prevent the doc build from failing.
#![cfg_attr(feature = "default", deny(rustdoc::broken_intra_doc_links))]
#[macro_use] #[macro_use]
mod func; mod func;