Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid_doc_attributes cannot be allowed or denied #85497

Closed
jyn514 opened this issue May 20, 2021 · 1 comment · Fixed by #85501
Closed

invalid_doc_attributes cannot be allowed or denied #85497

jyn514 opened this issue May 20, 2021 · 1 comment · Fixed by #85501
Assignees
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug.

Comments

@jyn514
Copy link
Member

jyn514 commented May 20, 2021

I tried this code:

#![deny(invalid_doc_attributes)]
#![doc(x)]

I expected to see this happen: An error that x is invalid.

Instead, this happened: The lint stays at a warning and rustc additionally warns that the lint name isn't recognized (#85457 (comment)):

warning: unknown lint: `invalid_doc_attributes`
 --> src/lib.rs:1:9
  |
1 | #![deny(invalid_doc_attributes)]
  |         ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unknown_lints)]` on by default

warning: unknown `doc` attribute `x`
 --> src/lib.rs:2:8
  |
2 | #![doc(x)]
  |        ^
  |
  = 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>

Meta

rustc --version --verbose: 1.54.0-nightly (2021-05-18 4e3e6db)

@jyn514 jyn514 added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. labels May 20, 2021
@jyn514
Copy link
Member Author

jyn514 commented May 20, 2021

Strangely, #![deny(forbidden_lint_groups)] (another future incompat lint) also has no effect, but doesn't give a warning that it's unknown.

@jyn514 jyn514 self-assigned this May 20, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Jun 5, 2021
@bors bors closed this as completed in 515c5af Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant