diff options
| author | bors <bors@rust-lang.org> | 2023-02-20 06:37:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-20 06:37:58 +0000 |
| commit | 7e253a7fb2e2e050021fed32da6fa2ec7bcea0fb (patch) | |
| tree | 5517431d3727a235fec8d254e29c7ca35fecdcf4 /src | |
| parent | 824f915cbc32c0942122389274a1b6fbe2ffc51e (diff) | |
| parent | fbd548acc3120bc7790f96134b7d6da5236933fd (diff) | |
| download | rust-7e253a7fb2e2e050021fed32da6fa2ec7bcea0fb.tar.gz rust-7e253a7fb2e2e050021fed32da6fa2ec7bcea0fb.zip | |
Auto merge of #106316 - camelid:rustdoc-all-only-stable, r=GuillaumeGomez
Only include stable lints in `rustdoc::all` group Fixes #106289. 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. r? `@GuillaumeGomez`
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/lint.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustdoc/lint.rs b/src/librustdoc/lint.rs index 3aad97bc296..6d289eb996d 100644 --- a/src/librustdoc/lint.rs +++ b/src/librustdoc/lint.rs @@ -194,7 +194,11 @@ pub(crate) fn register_lints(_sess: &Session, lint_store: &mut LintStore) { true, "rustdoc::all", Some("rustdoc"), - RUSTDOC_LINTS.iter().map(|&lint| LintId::of(lint)).collect(), + RUSTDOC_LINTS + .iter() + .filter(|lint| lint.feature_gate.is_none()) // only include stable lints + .map(|&lint| LintId::of(lint)) + .collect(), ); for lint in &*RUSTDOC_LINTS { let name = lint.name_lower(); |
