-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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)
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.