I tried these code:
#[forbid(clippy::no::matter::how::many::useless::segments::here::it::always::works::empty_loop)]
fn _foo() -> ! {
loop {}
}
#![forbid(rustdoc::no::matter::how::many::useless::segments::here::it::always::works::all)] // at least in crate root
I expected to see this happen: clippy or rustdoc reported them as unknown lints.
Instead, this happened: both clippy and rustdoc worked as if I specified clippy::empty_loop or rustdoc::all, without no::matter::how::many::useless::segments::here::it::always::works.
Meta
rustc version: 1.53.0-nightly (07e0e2e 2021-03-24)
Background
I discovered this through rust-analyzer, which tried to auto-complete something like #[allow(clippy::empty_loo with #[allow(clippy::clippy::empty_loop)], and then I found that syntax actually works.
I tried these code:
I expected to see this happen:
clippyorrustdocreported them as unknown lints.Instead, this happened: both
clippyandrustdocworked as if I specifiedclippy::empty_looporrustdoc::all, withoutno::matter::how::many::useless::segments::here::it::always::works.Meta
rustcversion: 1.53.0-nightly (07e0e2e 2021-03-24)Background
I discovered this through rust-analyzer, which tried to auto-complete something like
#[allow(clippy::empty_loowith#[allow(clippy::clippy::empty_loop)], and then I found that syntax actually works.