fbd548acc3
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.
16 lines
336 B
Rust
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
|