rust/tests/rustdoc-ui/rustdoc-all-only-stable-lints.rs
Noah Lev fbd548acc3 Only include stable lints in rustdoc::all group
Including unstable lints in the lint group produces unintuitive behavior
on stable (see #106289). Meanwhile, if we only included unstable lints
on nightly and not on stable, we could end up with confusing bugs that
were hard to compare across versions of Rust that lacked code changes.

I think that only including stable lints in `rustdoc::all`, no matter
the release channel, is the most intuitive option. Users can then
control unstable lints individually, which is reasonable since they have
to enable the feature gates individually anyway.
2023-02-19 22:05:58 -08:00

7 lines
129 B
Rust

// check-pass
// Ensure `rustdoc::all` only affects stable lints. See #106289.
#![deny(unknown_lints)]
#![allow(rustdoc::all)]