Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a243ef5

Browse files
authoredDec 30, 2023
Unrolled build for rust-lang#119388
Rollup merge of rust-lang#119388 - Enselic:prevent-lint-triplication, r=cjgillot rustc_lint: Prevent triplication of various lints Prevent triplication of various lints. The triplication happens because we run the same lint three times (or less in some cases): * In `BuiltinCombinedPreExpansionLintPass` * In `BuiltinCombinedEarlyLintPass` * In `shallow_lint_levels_on()` Only run the lints one time by checking the `lint_added_lints` bool. Set your GitHub diff setting to ignore whitespaces changes when reviewing this PR, since I had to enclose a block inside an if. Closes rust-lang#73301 (I found this while exploring the code related to [this](rust-lang#119251 (comment)) comment.)
2 parents 3cdd004 + 7ca4e9f commit a243ef5

37 files changed

+64
-664
lines changed
 

‎compiler/rustc_error_codes/src/error_codes/E0453.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Example of erroneous code:
88
99
#[allow(non_snake_case)]
1010
fn main() {
11-
let MyNumber = 2; // error: allow(non_snake_case) overruled by outer
12-
// forbid(non_snake_case)
11+
// error: allow(non_snake_case) incompatible with previous forbid
12+
let MyNumber = 2;
1313
}
1414
```
1515

‎compiler/rustc_lint/src/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ impl<'a> EarlyContext<'a> {
10691069
pub(crate) fn new(
10701070
sess: &'a Session,
10711071
features: &'a Features,
1072-
warn_about_weird_lints: bool,
1072+
lint_added_lints: bool,
10731073
lint_store: &'a LintStore,
10741074
registered_tools: &'a RegisteredTools,
10751075
buffered: LintBuffer,
@@ -1078,7 +1078,7 @@ impl<'a> EarlyContext<'a> {
10781078
builder: LintLevelsBuilder::new(
10791079
sess,
10801080
features,
1081-
warn_about_weird_lints,
1081+
lint_added_lints,
10821082
lint_store,
10831083
registered_tools,
10841084
),

‎compiler/rustc_lint/src/levels.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ fn lint_expectations(tcx: TyCtxt<'_>, (): ()) -> Vec<(LintExpectationId, LintExp
135135
unstable_to_stable_ids: FxHashMap::default(),
136136
empty: FxHashMap::default(),
137137
},
138-
warn_about_weird_lints: false,
138+
lint_added_lints: false,
139139
store,
140140
registered_tools: tcx.registered_tools(()),
141141
};
@@ -164,7 +164,7 @@ fn shallow_lint_levels_on(tcx: TyCtxt<'_>, owner: hir::OwnerId) -> ShallowLintLe
164164
empty: FxHashMap::default(),
165165
attrs,
166166
},
167-
warn_about_weird_lints: false,
167+
lint_added_lints: false,
168168
store,
169169
registered_tools: tcx.registered_tools(()),
170170
};
@@ -451,7 +451,7 @@ pub struct LintLevelsBuilder<'s, P> {
451451
sess: &'s Session,
452452
features: &'s Features,
453453
provider: P,
454-
warn_about_weird_lints: bool,
454+
lint_added_lints: bool,
455455
store: &'s LintStore,
456456
registered_tools: &'s RegisteredTools,
457457
}
@@ -464,15 +464,15 @@ impl<'s> LintLevelsBuilder<'s, TopDown> {
464464
pub(crate) fn new(
465465
sess: &'s Session,
466466
features: &'s Features,
467-
warn_about_weird_lints: bool,
467+
lint_added_lints: bool,
468468
store: &'s LintStore,
469469
registered_tools: &'s RegisteredTools,
470470
) -> Self {
471471
let mut builder = LintLevelsBuilder {
472472
sess,
473473
features,
474474
provider: TopDown { sets: LintLevelSets::new(), cur: COMMAND_LINE },
475-
warn_about_weird_lints,
475+
lint_added_lints,
476476
store,
477477
registered_tools,
478478
};
@@ -642,7 +642,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
642642
//
643643
// This means that this only errors if we're truly lowering the lint
644644
// level from forbid.
645-
if level != Level::Forbid {
645+
if self.lint_added_lints && level != Level::Forbid {
646646
if let Level::Forbid = old_level {
647647
// Backwards compatibility check:
648648
//
@@ -968,7 +968,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
968968
continue;
969969
}
970970

971-
_ if !self.warn_about_weird_lints => {}
971+
_ if !self.lint_added_lints => {}
972972

973973
CheckLintNameResult::Renamed(ref replace) => {
974974
let suggestion =
@@ -1029,7 +1029,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
10291029
}
10301030
}
10311031

1032-
if !is_crate_node {
1032+
if self.lint_added_lints && !is_crate_node {
10331033
for (id, &(level, ref src)) in self.current_specs().iter() {
10341034
if !id.lint.crate_level_only {
10351035
continue;
@@ -1054,33 +1054,33 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
10541054
/// Checks if the lint is gated on a feature that is not enabled.
10551055
///
10561056
/// Returns `true` if the lint's feature is enabled.
1057-
// FIXME only emit this once for each attribute, instead of repeating it 4 times for
1058-
// pre-expansion lints, post-expansion lints, `shallow_lint_levels_on` and `lint_expectations`.
10591057
#[track_caller]
10601058
fn check_gated_lint(&self, lint_id: LintId, span: Span, lint_from_cli: bool) -> bool {
10611059
if let Some(feature) = lint_id.lint.feature_gate {
10621060
if !self.features.active(feature) {
1063-
let lint = builtin::UNKNOWN_LINTS;
1064-
let (level, src) = self.lint_level(builtin::UNKNOWN_LINTS);
1065-
struct_lint_level(
1066-
self.sess,
1067-
lint,
1068-
level,
1069-
src,
1070-
Some(span.into()),
1071-
fluent::lint_unknown_gated_lint,
1072-
|lint| {
1073-
lint.set_arg("name", lint_id.lint.name_lower());
1074-
lint.note(fluent::lint_note);
1075-
rustc_session::parse::add_feature_diagnostics_for_issue(
1076-
lint,
1077-
&self.sess.parse_sess,
1078-
feature,
1079-
GateIssue::Language,
1080-
lint_from_cli,
1081-
);
1082-
},
1083-
);
1061+
if self.lint_added_lints {
1062+
let lint = builtin::UNKNOWN_LINTS;
1063+
let (level, src) = self.lint_level(builtin::UNKNOWN_LINTS);
1064+
struct_lint_level(
1065+
self.sess,
1066+
lint,
1067+
level,
1068+
src,
1069+
Some(span.into()),
1070+
fluent::lint_unknown_gated_lint,
1071+
|lint| {
1072+
lint.set_arg("name", lint_id.lint.name_lower());
1073+
lint.note(fluent::lint_note);
1074+
rustc_session::parse::add_feature_diagnostics_for_issue(
1075+
lint,
1076+
&self.sess.parse_sess,
1077+
feature,
1078+
GateIssue::Language,
1079+
lint_from_cli,
1080+
);
1081+
},
1082+
);
1083+
}
10841084
return false;
10851085
}
10861086
}

‎tests/ui/error-codes/E0453.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22

33
#[allow(non_snake_case)]
44
//~^ ERROR allow(non_snake_case) incompatible
5-
//~| ERROR allow(non_snake_case) incompatible
65
fn main() {
76
}

‎tests/ui/error-codes/E0453.stderr

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@ LL |
77
LL | #[allow(non_snake_case)]
88
| ^^^^^^^^^^^^^^ overruled by previous forbid
99

10-
error[E0453]: allow(non_snake_case) incompatible with previous forbid
11-
--> $DIR/E0453.rs:3:9
12-
|
13-
LL | #![forbid(non_snake_case)]
14-
| -------------- `forbid` level set here
15-
LL |
16-
LL | #[allow(non_snake_case)]
17-
| ^^^^^^^^^^^^^^ overruled by previous forbid
18-
|
19-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
20-
21-
error: aborting due to 2 previous errors
10+
error: aborting due to 1 previous error
2211

2312
For more information about this error, try `rustc --explain E0453`.

‎tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
#![deny(multiple_supertrait_upcastable)]
44
//~^ WARNING unknown lint: `multiple_supertrait_upcastable`
5-
//~| WARNING unknown lint: `multiple_supertrait_upcastable`
6-
//~| WARNING unknown lint: `multiple_supertrait_upcastable`
75
#![warn(multiple_supertrait_upcastable)]
86
//~^ WARNING unknown lint: `multiple_supertrait_upcastable`
9-
//~| WARNING unknown lint: `multiple_supertrait_upcastable`
10-
//~| WARNING unknown lint: `multiple_supertrait_upcastable`
117

128
fn main() {}

‎tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.stderr

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,53 +9,13 @@ LL | #![deny(multiple_supertrait_upcastable)]
99
= note: `#[warn(unknown_lints)]` on by default
1010

1111
warning: unknown lint: `multiple_supertrait_upcastable`
12-
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:7:1
12+
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:5:1
1313
|
1414
LL | #![warn(multiple_supertrait_upcastable)]
1515
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1616
|
1717
= note: the `multiple_supertrait_upcastable` lint is unstable
1818
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
1919

20-
warning: unknown lint: `multiple_supertrait_upcastable`
21-
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:3:1
22-
|
23-
LL | #![deny(multiple_supertrait_upcastable)]
24-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25-
|
26-
= note: the `multiple_supertrait_upcastable` lint is unstable
27-
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
28-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
29-
30-
warning: unknown lint: `multiple_supertrait_upcastable`
31-
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:7:1
32-
|
33-
LL | #![warn(multiple_supertrait_upcastable)]
34-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35-
|
36-
= note: the `multiple_supertrait_upcastable` lint is unstable
37-
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
38-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
39-
40-
warning: unknown lint: `multiple_supertrait_upcastable`
41-
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:3:1
42-
|
43-
LL | #![deny(multiple_supertrait_upcastable)]
44-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45-
|
46-
= note: the `multiple_supertrait_upcastable` lint is unstable
47-
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
48-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
49-
50-
warning: unknown lint: `multiple_supertrait_upcastable`
51-
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:7:1
52-
|
53-
LL | #![warn(multiple_supertrait_upcastable)]
54-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55-
|
56-
= note: the `multiple_supertrait_upcastable` lint is unstable
57-
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
58-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
59-
60-
warning: 6 warnings emitted
20+
warning: 2 warnings emitted
6121

‎tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22

33
#![deny(non_exhaustive_omitted_patterns)]
44
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
5-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
6-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
75
#![allow(non_exhaustive_omitted_patterns)]
86
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
9-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
10-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
117

128
fn main() {
139
enum Foo {
@@ -19,9 +15,6 @@ fn main() {
1915
#[allow(non_exhaustive_omitted_patterns)]
2016
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
2117
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
22-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
23-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
24-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
2518
match Foo::A {
2619
//~^ ERROR non-exhaustive patterns: `Foo::C` not covered
2720
Foo::A => {}
@@ -31,9 +24,6 @@ fn main() {
3124
#[warn(non_exhaustive_omitted_patterns)]
3225
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
3326
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
34-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
35-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
36-
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
3727
match Foo::A {
3828
Foo::A => {}
3929
Foo::B => {}

‎tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr

Lines changed: 8 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | #![deny(non_exhaustive_omitted_patterns)]
1010
= note: `#[warn(unknown_lints)]` on by default
1111

1212
warning: unknown lint: `non_exhaustive_omitted_patterns`
13-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:7:1
13+
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:5:1
1414
|
1515
LL | #![allow(non_exhaustive_omitted_patterns)]
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -20,7 +20,7 @@ LL | #![allow(non_exhaustive_omitted_patterns)]
2020
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
2121

2222
warning: unknown lint: `non_exhaustive_omitted_patterns`
23-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
23+
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5
2424
|
2525
LL | #[allow(non_exhaustive_omitted_patterns)]
2626
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -30,7 +30,7 @@ LL | #[allow(non_exhaustive_omitted_patterns)]
3030
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
3131

3232
warning: unknown lint: `non_exhaustive_omitted_patterns`
33-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
33+
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5
3434
|
3535
LL | #[allow(non_exhaustive_omitted_patterns)]
3636
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -41,7 +41,7 @@ LL | #[allow(non_exhaustive_omitted_patterns)]
4141
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4242

4343
warning: unknown lint: `non_exhaustive_omitted_patterns`
44-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
44+
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:24:5
4545
|
4646
LL | #[warn(non_exhaustive_omitted_patterns)]
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -51,73 +51,7 @@ LL | #[warn(non_exhaustive_omitted_patterns)]
5151
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
5252

5353
warning: unknown lint: `non_exhaustive_omitted_patterns`
54-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
55-
|
56-
LL | #[warn(non_exhaustive_omitted_patterns)]
57-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
58-
|
59-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
60-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
61-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
62-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
63-
64-
warning: unknown lint: `non_exhaustive_omitted_patterns`
65-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:3:1
66-
|
67-
LL | #![deny(non_exhaustive_omitted_patterns)]
68-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
69-
|
70-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
71-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
72-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
73-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
74-
75-
warning: unknown lint: `non_exhaustive_omitted_patterns`
76-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:7:1
77-
|
78-
LL | #![allow(non_exhaustive_omitted_patterns)]
79-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80-
|
81-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
82-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
83-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
84-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
85-
86-
warning: unknown lint: `non_exhaustive_omitted_patterns`
87-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
88-
|
89-
LL | #[allow(non_exhaustive_omitted_patterns)]
90-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91-
|
92-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
93-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
94-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
95-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
96-
97-
warning: unknown lint: `non_exhaustive_omitted_patterns`
98-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
99-
|
100-
LL | #[allow(non_exhaustive_omitted_patterns)]
101-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102-
|
103-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
104-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
105-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
106-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
107-
108-
warning: unknown lint: `non_exhaustive_omitted_patterns`
109-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
110-
|
111-
LL | #[warn(non_exhaustive_omitted_patterns)]
112-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113-
|
114-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
115-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
116-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
117-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
118-
119-
warning: unknown lint: `non_exhaustive_omitted_patterns`
120-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
54+
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:24:5
12155
|
12256
LL | #[warn(non_exhaustive_omitted_patterns)]
12357
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -128,13 +62,13 @@ LL | #[warn(non_exhaustive_omitted_patterns)]
12862
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
12963

13064
error[E0004]: non-exhaustive patterns: `Foo::C` not covered
131-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:25:11
65+
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:18:11
13266
|
13367
LL | match Foo::A {
13468
| ^^^^^^ pattern `Foo::C` not covered
13569
|
13670
note: `Foo` defined here
137-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:13:10
71+
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:9:10
13872
|
13973
LL | enum Foo {
14074
| ^^^
@@ -148,50 +82,6 @@ LL ~ Foo::B => {},
14882
LL + Foo::C => todo!()
14983
|
15084

151-
warning: unknown lint: `non_exhaustive_omitted_patterns`
152-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:3:1
153-
|
154-
LL | #![deny(non_exhaustive_omitted_patterns)]
155-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156-
|
157-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
158-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
159-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
160-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
161-
162-
warning: unknown lint: `non_exhaustive_omitted_patterns`
163-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:7:1
164-
|
165-
LL | #![allow(non_exhaustive_omitted_patterns)]
166-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
167-
|
168-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
169-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
170-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
171-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
172-
173-
warning: unknown lint: `non_exhaustive_omitted_patterns`
174-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
175-
|
176-
LL | #[allow(non_exhaustive_omitted_patterns)]
177-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
178-
|
179-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
180-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
181-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
182-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
183-
184-
warning: unknown lint: `non_exhaustive_omitted_patterns`
185-
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
186-
|
187-
LL | #[warn(non_exhaustive_omitted_patterns)]
188-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
189-
|
190-
= note: the `non_exhaustive_omitted_patterns` lint is unstable
191-
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
192-
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
193-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
194-
195-
error: aborting due to 1 previous error; 16 warnings emitted
85+
error: aborting due to 1 previous error; 6 warnings emitted
19686

19787
For more information about this error, try `rustc --explain E0004`.

‎tests/ui/feature-gates/feature-gate-strict_provenance.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22

33
#![deny(fuzzy_provenance_casts)]
44
//~^ WARNING unknown lint: `fuzzy_provenance_casts`
5-
//~| WARNING unknown lint: `fuzzy_provenance_casts`
6-
//~| WARNING unknown lint: `fuzzy_provenance_casts`
75
#![deny(lossy_provenance_casts)]
86
//~^ WARNING unknown lint: `lossy_provenance_casts`
9-
//~| WARNING unknown lint: `lossy_provenance_casts`
10-
//~| WARNING unknown lint: `lossy_provenance_casts`
117

128
fn main() {
139
// no warnings emitted since the lints are not activated

‎tests/ui/feature-gates/feature-gate-strict_provenance.stderr

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LL | #![deny(fuzzy_provenance_casts)]
1010
= note: `#[warn(unknown_lints)]` on by default
1111

1212
warning: unknown lint: `lossy_provenance_casts`
13-
--> $DIR/feature-gate-strict_provenance.rs:7:1
13+
--> $DIR/feature-gate-strict_provenance.rs:5:1
1414
|
1515
LL | #![deny(lossy_provenance_casts)]
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -19,49 +19,5 @@ LL | #![deny(lossy_provenance_casts)]
1919
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
2020
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
2121

22-
warning: unknown lint: `fuzzy_provenance_casts`
23-
--> $DIR/feature-gate-strict_provenance.rs:3:1
24-
|
25-
LL | #![deny(fuzzy_provenance_casts)]
26-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27-
|
28-
= note: the `fuzzy_provenance_casts` lint is unstable
29-
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
30-
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
31-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
32-
33-
warning: unknown lint: `lossy_provenance_casts`
34-
--> $DIR/feature-gate-strict_provenance.rs:7:1
35-
|
36-
LL | #![deny(lossy_provenance_casts)]
37-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38-
|
39-
= note: the `lossy_provenance_casts` lint is unstable
40-
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
41-
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
42-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
43-
44-
warning: unknown lint: `fuzzy_provenance_casts`
45-
--> $DIR/feature-gate-strict_provenance.rs:3:1
46-
|
47-
LL | #![deny(fuzzy_provenance_casts)]
48-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49-
|
50-
= note: the `fuzzy_provenance_casts` lint is unstable
51-
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
52-
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
53-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
54-
55-
warning: unknown lint: `lossy_provenance_casts`
56-
--> $DIR/feature-gate-strict_provenance.rs:7:1
57-
|
58-
LL | #![deny(lossy_provenance_casts)]
59-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60-
|
61-
= note: the `lossy_provenance_casts` lint is unstable
62-
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
63-
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
64-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
65-
66-
warning: 6 warnings emitted
22+
warning: 2 warnings emitted
6723

‎tests/ui/feature-gates/feature-gate-test_unstable_lint.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
// `test_unstable_lint` is for testing and should never be stabilized.
44
#![allow(test_unstable_lint)]
55
//~^ WARNING unknown lint: `test_unstable_lint`
6-
//~| WARNING unknown lint: `test_unstable_lint`
7-
//~| WARNING unknown lint: `test_unstable_lint`
86

97
fn main() {}

‎tests/ui/feature-gates/feature-gate-test_unstable_lint.stderr

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,5 @@ LL | #![allow(test_unstable_lint)]
88
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
99
= note: `#[warn(unknown_lints)]` on by default
1010

11-
warning: unknown lint: `test_unstable_lint`
12-
--> $DIR/feature-gate-test_unstable_lint.rs:4:1
13-
|
14-
LL | #![allow(test_unstable_lint)]
15-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16-
|
17-
= note: the `test_unstable_lint` lint is unstable
18-
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
19-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
20-
21-
warning: unknown lint: `test_unstable_lint`
22-
--> $DIR/feature-gate-test_unstable_lint.rs:4:1
23-
|
24-
LL | #![allow(test_unstable_lint)]
25-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26-
|
27-
= note: the `test_unstable_lint` lint is unstable
28-
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
29-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
30-
31-
warning: 3 warnings emitted
11+
warning: 1 warning emitted
3212

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// check-pass
22

33
#![warn(unnameable_types)] //~ WARN unknown lint
4-
//~| WARN unknown lint
5-
//~| WARN unknown lint
64
fn main() {}

‎tests/ui/feature-gates/feature-gate-type_privacy_lints.stderr

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,5 @@ LL | #![warn(unnameable_types)]
99
= help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable
1010
= note: `#[warn(unknown_lints)]` on by default
1111

12-
warning: unknown lint: `unnameable_types`
13-
--> $DIR/feature-gate-type_privacy_lints.rs:3:1
14-
|
15-
LL | #![warn(unnameable_types)]
16-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
17-
|
18-
= note: the `unnameable_types` lint is unstable
19-
= note: see issue #48054 <https://github.com/rust-lang/rust/issues/48054> for more information
20-
= help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable
21-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
22-
23-
warning: unknown lint: `unnameable_types`
24-
--> $DIR/feature-gate-type_privacy_lints.rs:3:1
25-
|
26-
LL | #![warn(unnameable_types)]
27-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
28-
|
29-
= note: the `unnameable_types` lint is unstable
30-
= note: see issue #48054 <https://github.com/rust-lang/rust/issues/48054> for more information
31-
= help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable
32-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
33-
34-
warning: 3 warnings emitted
12+
warning: 1 warning emitted
3513

‎tests/ui/lint/crate_level_only_lint.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,14 @@
33
mod foo {
44
#![allow(uncommon_codepoints)]
55
//~^ ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
6-
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
7-
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
86

97
#[allow(uncommon_codepoints)]
108
//~^ ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
11-
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
12-
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
139
const BAR: f64 = 0.000001;
1410

1511
}
1612

1713
#[allow(uncommon_codepoints)]
1814
//~^ ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
19-
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
20-
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
2115
fn main() {
2216
}

‎tests/ui/lint/crate_level_only_lint.stderr

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,64 +11,16 @@ LL | #![deny(uncommon_codepoints, unused_attributes)]
1111
| ^^^^^^^^^^^^^^^^^
1212

1313
error: allow(uncommon_codepoints) is ignored unless specified at crate level
14-
--> $DIR/crate_level_only_lint.rs:9:9
14+
--> $DIR/crate_level_only_lint.rs:7:9
1515
|
1616
LL | #[allow(uncommon_codepoints)]
1717
| ^^^^^^^^^^^^^^^^^^^
1818

1919
error: allow(uncommon_codepoints) is ignored unless specified at crate level
20-
--> $DIR/crate_level_only_lint.rs:17:9
20+
--> $DIR/crate_level_only_lint.rs:13:9
2121
|
2222
LL | #[allow(uncommon_codepoints)]
2323
| ^^^^^^^^^^^^^^^^^^^
2424

25-
error: allow(uncommon_codepoints) is ignored unless specified at crate level
26-
--> $DIR/crate_level_only_lint.rs:4:10
27-
|
28-
LL | #![allow(uncommon_codepoints)]
29-
| ^^^^^^^^^^^^^^^^^^^
30-
|
31-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
32-
33-
error: allow(uncommon_codepoints) is ignored unless specified at crate level
34-
--> $DIR/crate_level_only_lint.rs:9:9
35-
|
36-
LL | #[allow(uncommon_codepoints)]
37-
| ^^^^^^^^^^^^^^^^^^^
38-
|
39-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
40-
41-
error: allow(uncommon_codepoints) is ignored unless specified at crate level
42-
--> $DIR/crate_level_only_lint.rs:17:9
43-
|
44-
LL | #[allow(uncommon_codepoints)]
45-
| ^^^^^^^^^^^^^^^^^^^
46-
|
47-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
48-
49-
error: allow(uncommon_codepoints) is ignored unless specified at crate level
50-
--> $DIR/crate_level_only_lint.rs:4:10
51-
|
52-
LL | #![allow(uncommon_codepoints)]
53-
| ^^^^^^^^^^^^^^^^^^^
54-
|
55-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
56-
57-
error: allow(uncommon_codepoints) is ignored unless specified at crate level
58-
--> $DIR/crate_level_only_lint.rs:9:9
59-
|
60-
LL | #[allow(uncommon_codepoints)]
61-
| ^^^^^^^^^^^^^^^^^^^
62-
|
63-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
64-
65-
error: allow(uncommon_codepoints) is ignored unless specified at crate level
66-
--> $DIR/crate_level_only_lint.rs:17:9
67-
|
68-
LL | #[allow(uncommon_codepoints)]
69-
| ^^^^^^^^^^^^^^^^^^^
70-
|
71-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
72-
73-
error: aborting due to 9 previous errors
25+
error: aborting due to 3 previous errors
7426

‎tests/ui/lint/forbid-group-group-2.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,4 @@
1111
//~| WARNING previously accepted by the compiler
1212
//~| ERROR incompatible with previous
1313
//~| WARNING previously accepted by the compiler
14-
//~| ERROR incompatible with previous
15-
//~| WARNING previously accepted by the compiler
16-
//~| ERROR incompatible with previous
17-
//~| WARNING previously accepted by the compiler
18-
//~| ERROR incompatible with previous
19-
//~| WARNING previously accepted by the compiler
20-
//~| ERROR incompatible with previous
21-
//~| WARNING previously accepted by the compiler
22-
//~| ERROR incompatible with previous
23-
//~| WARNING previously accepted by the compiler
24-
//~| ERROR incompatible with previous
25-
//~| WARNING previously accepted by the compiler
2614
fn main() {}

‎tests/ui/lint/forbid-group-group-2.stderr

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -41,83 +41,5 @@ LL | #[allow(nonstandard_style)]
4141
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
4242
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4343

44-
error: allow(nonstandard_style) incompatible with previous forbid
45-
--> $DIR/forbid-group-group-2.rs:7:9
46-
|
47-
LL | #![forbid(warnings)]
48-
| -------- `forbid` level set here
49-
...
50-
LL | #[allow(nonstandard_style)]
51-
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
52-
|
53-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
54-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
55-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
56-
57-
error: allow(nonstandard_style) incompatible with previous forbid
58-
--> $DIR/forbid-group-group-2.rs:7:9
59-
|
60-
LL | #![forbid(warnings)]
61-
| -------- `forbid` level set here
62-
...
63-
LL | #[allow(nonstandard_style)]
64-
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
65-
|
66-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
67-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
68-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
69-
70-
error: allow(nonstandard_style) incompatible with previous forbid
71-
--> $DIR/forbid-group-group-2.rs:7:9
72-
|
73-
LL | #![forbid(warnings)]
74-
| -------- `forbid` level set here
75-
...
76-
LL | #[allow(nonstandard_style)]
77-
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
78-
|
79-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
80-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
81-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
82-
83-
error: allow(nonstandard_style) incompatible with previous forbid
84-
--> $DIR/forbid-group-group-2.rs:7:9
85-
|
86-
LL | #![forbid(warnings)]
87-
| -------- `forbid` level set here
88-
...
89-
LL | #[allow(nonstandard_style)]
90-
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
91-
|
92-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
93-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
94-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
95-
96-
error: allow(nonstandard_style) incompatible with previous forbid
97-
--> $DIR/forbid-group-group-2.rs:7:9
98-
|
99-
LL | #![forbid(warnings)]
100-
| -------- `forbid` level set here
101-
...
102-
LL | #[allow(nonstandard_style)]
103-
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
104-
|
105-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
106-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
107-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
108-
109-
error: allow(nonstandard_style) incompatible with previous forbid
110-
--> $DIR/forbid-group-group-2.rs:7:9
111-
|
112-
LL | #![forbid(warnings)]
113-
| -------- `forbid` level set here
114-
...
115-
LL | #[allow(nonstandard_style)]
116-
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
117-
|
118-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
119-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
120-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
121-
122-
error: aborting due to 9 previous errors
44+
error: aborting due to 3 previous errors
12345

‎tests/ui/lint/forbid-group-member.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
#[allow(unused_variables)]
99
//~^ WARNING incompatible with previous forbid
1010
//~| WARNING previously accepted
11-
//~| WARNING incompatible with previous forbid
12-
//~| WARNING previously accepted
13-
//~| WARNING incompatible with previous forbid
14-
//~| WARNING previously accepted
1511
fn main() {
1612
let a: ();
1713
}

‎tests/ui/lint/forbid-group-member.stderr

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,5 @@ LL | #[allow(unused_variables)]
1111
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
1212
= note: `#[warn(forbidden_lint_groups)]` on by default
1313

14-
warning: allow(unused_variables) incompatible with previous forbid
15-
--> $DIR/forbid-group-member.rs:8:9
16-
|
17-
LL | #![forbid(unused)]
18-
| ------ `forbid` level set here
19-
LL |
20-
LL | #[allow(unused_variables)]
21-
| ^^^^^^^^^^^^^^^^ overruled by previous forbid
22-
|
23-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
24-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
25-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
26-
27-
warning: allow(unused_variables) incompatible with previous forbid
28-
--> $DIR/forbid-group-member.rs:8:9
29-
|
30-
LL | #![forbid(unused)]
31-
| ------ `forbid` level set here
32-
LL |
33-
LL | #[allow(unused_variables)]
34-
| ^^^^^^^^^^^^^^^^ overruled by previous forbid
35-
|
36-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
37-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
38-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
39-
40-
warning: 3 warnings emitted
14+
warning: 1 warning emitted
4115

‎tests/ui/lint/forbid-member-group.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#[allow(unused)]
77
//~^ ERROR incompatible with previous forbid
8-
//~| ERROR incompatible with previous forbid
98
fn main() {
109
let a: ();
1110
}

‎tests/ui/lint/forbid-member-group.stderr

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@ LL |
77
LL | #[allow(unused)]
88
| ^^^^^^ overruled by previous forbid
99

10-
error[E0453]: allow(unused) incompatible with previous forbid
11-
--> $DIR/forbid-member-group.rs:6:9
12-
|
13-
LL | #![forbid(unused_variables)]
14-
| ---------------- `forbid` level set here
15-
LL |
16-
LL | #[allow(unused)]
17-
| ^^^^^^ overruled by previous forbid
18-
|
19-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
20-
21-
error: aborting due to 2 previous errors
10+
error: aborting due to 1 previous error
2211

2312
For more information about this error, try `rustc --explain E0453`.

‎tests/ui/lint/issue-80988.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77
#[deny(warnings)]
88
//~^ WARNING incompatible with previous forbid
99
//~| WARNING being phased out
10-
//~| WARNING incompatible with previous forbid
11-
//~| WARNING being phased out
12-
//~| WARNING incompatible with previous forbid
13-
//~| WARNING being phased out
1410
fn main() {}

‎tests/ui/lint/issue-80988.stderr

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,5 @@ LL | #[deny(warnings)]
1111
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
1212
= note: `#[warn(forbidden_lint_groups)]` on by default
1313

14-
warning: deny(warnings) incompatible with previous forbid
15-
--> $DIR/issue-80988.rs:7:8
16-
|
17-
LL | #![forbid(warnings)]
18-
| -------- `forbid` level set here
19-
LL |
20-
LL | #[deny(warnings)]
21-
| ^^^^^^^^ overruled by previous forbid
22-
|
23-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
24-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
25-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
26-
27-
warning: deny(warnings) incompatible with previous forbid
28-
--> $DIR/issue-80988.rs:7:8
29-
|
30-
LL | #![forbid(warnings)]
31-
| -------- `forbid` level set here
32-
LL |
33-
LL | #[deny(warnings)]
34-
| ^^^^^^^^ overruled by previous forbid
35-
|
36-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
37-
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
38-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
39-
40-
warning: 3 warnings emitted
14+
warning: 1 warning emitted
4115

‎tests/ui/lint/lint-forbid-attr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22

33
#[allow(deprecated)]
44
//~^ ERROR allow(deprecated) incompatible
5-
//~| ERROR allow(deprecated) incompatible
65
fn main() {
76
}

‎tests/ui/lint/lint-forbid-attr.stderr

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@ LL |
77
LL | #[allow(deprecated)]
88
| ^^^^^^^^^^ overruled by previous forbid
99

10-
error[E0453]: allow(deprecated) incompatible with previous forbid
11-
--> $DIR/lint-forbid-attr.rs:3:9
12-
|
13-
LL | #![forbid(deprecated)]
14-
| ---------- `forbid` level set here
15-
LL |
16-
LL | #[allow(deprecated)]
17-
| ^^^^^^^^^^ overruled by previous forbid
18-
|
19-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
20-
21-
error: aborting due to 2 previous errors
10+
error: aborting due to 1 previous error
2211

2312
For more information about this error, try `rustc --explain E0453`.

‎tests/ui/lint/lint-forbid-cmdline.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// compile-flags: -F deprecated
22

33
#[allow(deprecated)] //~ ERROR allow(deprecated) incompatible
4-
//~| ERROR allow(deprecated) incompatible
54
fn main() {
65
}

‎tests/ui/lint/lint-forbid-cmdline.stderr

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ LL | #[allow(deprecated)]
66
|
77
= note: `forbid` lint level was set on command line
88

9-
error[E0453]: allow(deprecated) incompatible with previous forbid
10-
--> $DIR/lint-forbid-cmdline.rs:3:9
11-
|
12-
LL | #[allow(deprecated)]
13-
| ^^^^^^^^^^ overruled by previous forbid
14-
|
15-
= note: `forbid` lint level was set on command line
16-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
17-
18-
error: aborting due to 2 previous errors
9+
error: aborting due to 1 previous error
1910

2011
For more information about this error, try `rustc --explain E0453`.

‎tests/ui/lint/must_not_suspend/gated.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// edition:2018
44
#![deny(must_not_suspend)]
55
//~^ WARNING unknown lint: `must_not_suspend`
6-
//~| WARNING unknown lint: `must_not_suspend`
7-
//~| WARNING unknown lint: `must_not_suspend`
86

97
async fn other() {}
108

‎tests/ui/lint/must_not_suspend/gated.stderr

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,5 @@ LL | #![deny(must_not_suspend)]
99
= help: add `#![feature(must_not_suspend)]` to the crate attributes to enable
1010
= note: `#[warn(unknown_lints)]` on by default
1111

12-
warning: unknown lint: `must_not_suspend`
13-
--> $DIR/gated.rs:4:1
14-
|
15-
LL | #![deny(must_not_suspend)]
16-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
17-
|
18-
= note: the `must_not_suspend` lint is unstable
19-
= note: see issue #83310 <https://github.com/rust-lang/rust/issues/83310> for more information
20-
= help: add `#![feature(must_not_suspend)]` to the crate attributes to enable
21-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
22-
23-
warning: unknown lint: `must_not_suspend`
24-
--> $DIR/gated.rs:4:1
25-
|
26-
LL | #![deny(must_not_suspend)]
27-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
28-
|
29-
= note: the `must_not_suspend` lint is unstable
30-
= note: see issue #83310 <https://github.com/rust-lang/rust/issues/83310> for more information
31-
= help: add `#![feature(must_not_suspend)]` to the crate attributes to enable
32-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
33-
34-
warning: 3 warnings emitted
12+
warning: 1 warning emitted
3513

‎tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.stderr

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,5 @@ error: unknown lint: `test_unstable_lint`
44
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
55
= note: requested on the command line with `-D unknown-lints`
66

7-
error: unknown lint: `test_unstable_lint`
8-
|
9-
= note: the `test_unstable_lint` lint is unstable
10-
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
11-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
12-
13-
error: unknown lint: `test_unstable_lint`
14-
|
15-
= note: the `test_unstable_lint` lint is unstable
16-
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
17-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
18-
19-
error: aborting due to 3 previous errors
7+
error: aborting due to 1 previous error
208

‎tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
#![deny(unknown_lints)]
44
#![allow(test_unstable_lint)]
55
//~^ ERROR unknown lint: `test_unstable_lint`
6-
//~| ERROR unknown lint: `test_unstable_lint`
7-
//~| ERROR unknown lint: `test_unstable_lint`
86

97
fn main() {}

‎tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.stderr

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,5 @@ note: the lint level is defined here
1212
LL | #![deny(unknown_lints)]
1313
| ^^^^^^^^^^^^^
1414

15-
error: unknown lint: `test_unstable_lint`
16-
--> $DIR/deny-unstable-lint-inline.rs:4:1
17-
|
18-
LL | #![allow(test_unstable_lint)]
19-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20-
|
21-
= note: the `test_unstable_lint` lint is unstable
22-
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
23-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
24-
25-
error: unknown lint: `test_unstable_lint`
26-
--> $DIR/deny-unstable-lint-inline.rs:4:1
27-
|
28-
LL | #![allow(test_unstable_lint)]
29-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30-
|
31-
= note: the `test_unstable_lint` lint is unstable
32-
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
33-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
34-
35-
error: aborting due to 3 previous errors
15+
error: aborting due to 1 previous error
3616

‎tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.stderr

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,5 @@ warning: unknown lint: `test_unstable_lint`
44
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
55
= note: requested on the command line with `-W unknown-lints`
66

7-
warning: unknown lint: `test_unstable_lint`
8-
|
9-
= note: the `test_unstable_lint` lint is unstable
10-
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
11-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
12-
13-
warning: unknown lint: `test_unstable_lint`
14-
|
15-
= note: the `test_unstable_lint` lint is unstable
16-
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
17-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
18-
19-
warning: 3 warnings emitted
7+
warning: 1 warning emitted
208

‎tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
#![warn(unknown_lints)]
44
#![allow(test_unstable_lint)]
55
//~^ WARNING unknown lint: `test_unstable_lint`
6-
//~| WARNING unknown lint: `test_unstable_lint`
7-
//~| WARNING unknown lint: `test_unstable_lint`
86

97
fn main() {}

‎tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.stderr

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,5 @@ note: the lint level is defined here
1212
LL | #![warn(unknown_lints)]
1313
| ^^^^^^^^^^^^^
1414

15-
warning: unknown lint: `test_unstable_lint`
16-
--> $DIR/warn-unknown-unstable-lint-inline.rs:4:1
17-
|
18-
LL | #![allow(test_unstable_lint)]
19-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20-
|
21-
= note: the `test_unstable_lint` lint is unstable
22-
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
23-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
24-
25-
warning: unknown lint: `test_unstable_lint`
26-
--> $DIR/warn-unknown-unstable-lint-inline.rs:4:1
27-
|
28-
LL | #![allow(test_unstable_lint)]
29-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30-
|
31-
= note: the `test_unstable_lint` lint is unstable
32-
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
33-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
34-
35-
warning: 3 warnings emitted
15+
warning: 1 warning emitted
3616

0 commit comments

Comments
 (0)
This repository has been archived.