rust/tests/rustdoc-ui/check.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

16 lines
336 B
Rust

// check-pass
// compile-flags: -Z unstable-options --check
// normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
#![feature(rustdoc_missing_doc_code_examples)]
//~^ WARN
//~^^ WARN
#![warn(missing_docs)]
#![warn(rustdoc::missing_doc_code_examples)]
#![warn(rustdoc::all)]
pub fn foo() {}
//~^ WARN
//~^^ WARN