Skip to content

Commit 41c3b5c

Browse files
committed
show forbidden_lint_groups in future-compat reports
1 parent dff3e7c commit 41c3b5c

File tree

5 files changed

+879
-1
lines changed

5 files changed

+879
-1
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ declare_lint! {
179179
Warn,
180180
"applying forbid to lint-groups",
181181
@future_incompatible = FutureIncompatibleInfo {
182-
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
182+
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
183183
reference: "issue #81670 <https://github.com/rust-lang/rust/issues/81670>",
184184
};
185185
}

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

+54
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,57 @@ LL | #[allow(nonstandard_style)]
4343

4444
error: aborting due to 3 previous errors
4545

46+
Future incompatibility report: Future breakage diagnostic:
47+
error: allow(nonstandard_style) incompatible with previous forbid
48+
--> $DIR/forbid-group-group-2.rs:7:9
49+
|
50+
LL | #![forbid(warnings)]
51+
| -------- `forbid` level set here
52+
...
53+
LL | #[allow(nonstandard_style)]
54+
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
55+
|
56+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
57+
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
58+
note: the lint level is defined here
59+
--> $DIR/forbid-group-group-2.rs:5:9
60+
|
61+
LL | #![deny(forbidden_lint_groups)]
62+
| ^^^^^^^^^^^^^^^^^^^^^
63+
64+
Future breakage diagnostic:
65+
error: allow(nonstandard_style) incompatible with previous forbid
66+
--> $DIR/forbid-group-group-2.rs:7:9
67+
|
68+
LL | #![forbid(warnings)]
69+
| -------- `forbid` level set here
70+
...
71+
LL | #[allow(nonstandard_style)]
72+
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
73+
|
74+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
75+
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
76+
note: the lint level is defined here
77+
--> $DIR/forbid-group-group-2.rs:5:9
78+
|
79+
LL | #![deny(forbidden_lint_groups)]
80+
| ^^^^^^^^^^^^^^^^^^^^^
81+
82+
Future breakage diagnostic:
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: the lint level is defined here
95+
--> $DIR/forbid-group-group-2.rs:5:9
96+
|
97+
LL | #![deny(forbidden_lint_groups)]
98+
| ^^^^^^^^^^^^^^^^^^^^^
99+

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

+14
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,17 @@ LL | #[allow(unused_variables)]
1313

1414
warning: 1 warning emitted
1515

16+
Future incompatibility report: Future breakage diagnostic:
17+
warning: allow(unused_variables) incompatible with previous forbid
18+
--> $DIR/forbid-group-member.rs:8:9
19+
|
20+
LL | #![forbid(unused)]
21+
| ------ `forbid` level set here
22+
LL |
23+
LL | #[allow(unused_variables)]
24+
| ^^^^^^^^^^^^^^^^ overruled by previous forbid
25+
|
26+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27+
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
28+
= note: `#[warn(forbidden_lint_groups)]` on by default
29+

0 commit comments

Comments
 (0)