Closed
Description
I tried this code:
#[doc(inline)]
pub extern crate cre;
I expected to see this happen: Rustdoc gives no warning, and shows the module "core" instead of "pub use extern crate core".
Instead, this happened: Rustdoc shows the module, but still gives a warning:
warning: this attribute can only be applied to a `use` item
--> src\main.rs:1:7
|
1 | #[doc(inline)]
| ^^^^^^ only applicable on `use` items
2 | pub extern crate std;
| --------------------- not a `use` item
|
= note: `#[warn(invalid_doc_attributes)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
= note: read https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#docno_inlinedocinline for more information
Meta
rustc --version
: rustc 1.54.0-nightly (cc77ba4 2021-06-03)