`doc(rust_logo)` is improperly feature gated
Open
@mejrs is already working on this.
Since Sep 3, 2026.
A-attributes
C-bug
T-compiler
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
#[doc(rust_logo)]
struct Foo;
I expected to see this happen: doc(rust_logo) is unstable, so compile error since no feature is used.
Instead, this happened:
warning: this attribute can only be applied at the crate level
--> src/lib.rs:1:7
|
1 | #[doc(rust_logo)]
| ^^^^^^^^^
|
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
= note: `#[warn(invalid_doc_attributes)]` on by default
Meta
rustc --version --verbose:
Rust 1.0.0 and up
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.