Skip to content

Commit b19a6f8

Browse files
Auto merge of #144544 - JonathanBrouwer:illformed-in-deps, r=<try>
Start reporting future breakage for `ILL_FORMED_ATTRIBUTE_INPUT` in dependencies
2 parents 65b6cdb + 7bd902d commit b19a6f8

File tree

7 files changed

+177
-0
lines changed

7 files changed

+177
-0
lines changed

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ declare_lint! {
216216
@future_incompatible = FutureIncompatibleInfo {
217217
reason: FutureIncompatibilityReason::FutureReleaseError,
218218
reference: "issue #57571 <https://github.com/rust-lang/rust/issues/57571>",
219+
report_in_deps: true,
219220
};
220221
crate_level_only
221222
}

tests/ui/attributes/lint_on_root.stderr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,14 @@ LL | #![inline = ""]
1010

1111
error: aborting due to 1 previous error
1212

13+
Future incompatibility report: Future breakage diagnostic:
14+
error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
15+
--> $DIR/lint_on_root.rs:3:1
16+
|
17+
LL | #![inline = ""]
18+
| ^^^^^^^^^^^^^^^
19+
|
20+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
21+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
22+
= note: `#[deny(ill_formed_attribute_input)]` on by default
23+

tests/ui/attributes/malformed-attrs.stderr

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,3 +666,69 @@ error: aborting due to 75 previous errors; 3 warnings emitted
666666

667667
Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805.
668668
For more information about an error, try `rustc --explain E0308`.
669+
Future incompatibility report: Future breakage diagnostic:
670+
error: valid forms for the attribute are `#[doc(hidden|inline|...)]` and `#[doc = "string"]`
671+
--> $DIR/malformed-attrs.rs:44:1
672+
|
673+
LL | #[doc]
674+
| ^^^^^^
675+
|
676+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
677+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
678+
= note: `#[deny(ill_formed_attribute_input)]` on by default
679+
680+
Future breakage diagnostic:
681+
error: valid forms for the attribute are `#[doc(hidden|inline|...)]` and `#[doc = "string"]`
682+
--> $DIR/malformed-attrs.rs:77:1
683+
|
684+
LL | #[doc]
685+
| ^^^^^^
686+
|
687+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
688+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
689+
= note: `#[deny(ill_formed_attribute_input)]` on by default
690+
691+
Future breakage diagnostic:
692+
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
693+
--> $DIR/malformed-attrs.rs:84:1
694+
|
695+
LL | #[link]
696+
| ^^^^^^^
697+
|
698+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
699+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
700+
= note: `#[deny(ill_formed_attribute_input)]` on by default
701+
702+
Future breakage diagnostic:
703+
error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
704+
--> $DIR/malformed-attrs.rs:54:1
705+
|
706+
LL | #[inline = 5]
707+
| ^^^^^^^^^^^^^
708+
|
709+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
710+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
711+
= note: `#[deny(ill_formed_attribute_input)]` on by default
712+
713+
Future breakage diagnostic:
714+
error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
715+
--> $DIR/malformed-attrs.rs:95:1
716+
|
717+
LL | #[ignore()]
718+
| ^^^^^^^^^^^
719+
|
720+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
721+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
722+
= note: `#[deny(ill_formed_attribute_input)]` on by default
723+
724+
Future breakage diagnostic:
725+
error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
726+
--> $DIR/malformed-attrs.rs:224:1
727+
|
728+
LL | #[ignore = 1]
729+
| ^^^^^^^^^^^^^
730+
|
731+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
732+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
733+
= note: `#[deny(ill_formed_attribute_input)]` on by default
734+

tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,3 +318,14 @@ error: aborting due to 38 previous errors
318318

319319
Some errors have detailed explanations: E0517, E0518, E0658.
320320
For more information about an error, try `rustc --explain E0517`.
321+
Future incompatibility report: Future breakage diagnostic:
322+
error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
323+
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
324+
|
325+
LL | #[inline = "2100"] fn f() { }
326+
| ^^^^^^^^^^^^^^^^^^
327+
|
328+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
329+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
330+
= note: `#[deny(ill_formed_attribute_input)]` on by default
331+

tests/ui/link-native-libs/link-attr-validation-early.stderr

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,25 @@ LL | #[link = "foo"]
1919

2020
error: aborting due to 2 previous errors
2121

22+
Future incompatibility report: Future breakage diagnostic:
23+
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
24+
--> $DIR/link-attr-validation-early.rs:2:1
25+
|
26+
LL | #[link]
27+
| ^^^^^^^
28+
|
29+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
30+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
31+
= note: `#[deny(ill_formed_attribute_input)]` on by default
32+
33+
Future breakage diagnostic:
34+
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
35+
--> $DIR/link-attr-validation-early.rs:4:1
36+
|
37+
LL | #[link = "foo"]
38+
| ^^^^^^^^^^^^^^^
39+
|
40+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
41+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
42+
= note: `#[deny(ill_formed_attribute_input)]` on by default
43+

tests/ui/macros/issue-111749.stderr

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ LL | cbor_map! { #[test(test)] 4};
1616

1717
error: aborting due to 2 previous errors
1818

19+
Future incompatibility report: Future breakage diagnostic:
20+
error: attribute must be of the form `#[test]`
21+
--> $DIR/issue-111749.rs:8:17
22+
|
23+
LL | cbor_map! { #[test(test)] 4};
24+
| ^^^^^^^^^^^^^
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 #57571 <https://github.com/rust-lang/rust/issues/57571>
28+
= note: `#[deny(ill_formed_attribute_input)]` on by default
29+

tests/ui/malformed/malformed-regressions.stderr

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,58 @@ LL | #[inline = ""]
4646

4747
error: aborting due to 5 previous errors
4848

49+
Future incompatibility report: Future breakage diagnostic:
50+
error: valid forms for the attribute are `#[doc(hidden|inline|...)]` and `#[doc = "string"]`
51+
--> $DIR/malformed-regressions.rs:1:1
52+
|
53+
LL | #[doc]
54+
| ^^^^^^
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 #57571 <https://github.com/rust-lang/rust/issues/57571>
58+
= note: `#[deny(ill_formed_attribute_input)]` on by default
59+
60+
Future breakage diagnostic:
61+
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
62+
--> $DIR/malformed-regressions.rs:7:1
63+
|
64+
LL | #[link]
65+
| ^^^^^^^
66+
|
67+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
68+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
69+
= note: `#[deny(ill_formed_attribute_input)]` on by default
70+
71+
Future breakage diagnostic:
72+
error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
73+
--> $DIR/malformed-regressions.rs:9:1
74+
|
75+
LL | #[link = ""]
76+
| ^^^^^^^^^^^^
77+
|
78+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
79+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
80+
= note: `#[deny(ill_formed_attribute_input)]` on by default
81+
82+
Future breakage diagnostic:
83+
error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
84+
--> $DIR/malformed-regressions.rs:3:1
85+
|
86+
LL | #[ignore()]
87+
| ^^^^^^^^^^^
88+
|
89+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
90+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
91+
= note: `#[deny(ill_formed_attribute_input)]` on by default
92+
93+
Future breakage diagnostic:
94+
error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
95+
--> $DIR/malformed-regressions.rs:5:1
96+
|
97+
LL | #[inline = ""]
98+
| ^^^^^^^^^^^^^^
99+
|
100+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
101+
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
102+
= note: `#[deny(ill_formed_attribute_input)]` on by default
103+

0 commit comments

Comments
 (0)