|
15 | 15 | #![stable(feature = "rust1", since = "1.0.0")] |
16 | 16 |
|
17 | 17 | mod bogus_attribute_types_1 { |
18 | | - #[stable(feature = "a", since = "a", reason)] //~ ERROR unknown meta item 'reason' |
| 18 | + #[stable(feature = "a", since = "a", reason)] //~ ERROR unknown meta item 'reason' [E0541] |
19 | 19 | fn f1() { } |
20 | 20 |
|
21 | | - #[stable(feature = "a", since)] //~ ERROR incorrect meta item |
| 21 | + #[stable(feature = "a", since)] //~ ERROR incorrect meta item [E0539] |
22 | 22 | fn f2() { } |
23 | 23 |
|
24 | | - #[stable(feature, since = "a")] //~ ERROR incorrect meta item |
| 24 | + #[stable(feature, since = "a")] //~ ERROR incorrect meta item [E0539] |
25 | 25 | fn f3() { } |
26 | 26 |
|
27 | | - #[stable(feature = "a", since(b))] //~ ERROR incorrect meta item |
| 27 | + #[stable(feature = "a", since(b))] //~ ERROR incorrect meta item [E0539] |
28 | 28 | fn f5() { } |
29 | 29 |
|
30 | | - #[stable(feature(b), since = "a")] //~ ERROR incorrect meta item |
| 30 | + #[stable(feature(b), since = "a")] //~ ERROR incorrect meta item [E0539] |
31 | 31 | fn f6() { } |
32 | 32 | } |
33 | 33 |
|
34 | 34 | mod bogus_attribute_types_2 { |
35 | | - #[unstable] //~ ERROR incorrect stability attribute type |
| 35 | + #[unstable] //~ ERROR incorrect stability attribute type [E0548] |
36 | 36 | fn f1() { } |
37 | 37 |
|
38 | | - #[unstable = "a"] //~ ERROR incorrect stability attribute type |
| 38 | + #[unstable = "a"] //~ ERROR incorrect stability attribute type [E0548] |
39 | 39 | fn f2() { } |
40 | 40 |
|
41 | | - #[stable] //~ ERROR incorrect stability attribute type |
| 41 | + #[stable] //~ ERROR incorrect stability attribute type [E0548] |
42 | 42 | fn f3() { } |
43 | 43 |
|
44 | | - #[stable = "a"] //~ ERROR incorrect stability attribute type |
| 44 | + #[stable = "a"] //~ ERROR incorrect stability attribute type [E0548] |
45 | 45 | fn f4() { } |
46 | 46 |
|
47 | 47 | #[stable(feature = "a", since = "b")] |
48 | | - #[rustc_deprecated] //~ ERROR incorrect stability attribute type |
| 48 | + #[rustc_deprecated] //~ ERROR incorrect stability attribute type [E0548] |
49 | 49 | fn f5() { } |
50 | 50 |
|
51 | 51 | #[stable(feature = "a", since = "b")] |
52 | | - #[rustc_deprecated = "a"] //~ ERROR incorrect stability attribute type |
| 52 | + #[rustc_deprecated = "a"] //~ ERROR incorrect stability attribute type [E0548] |
53 | 53 | fn f6() { } |
54 | 54 | } |
55 | 55 |
|
56 | 56 | mod missing_feature_names { |
57 | | - #[unstable(issue = "0")] //~ ERROR missing 'feature' |
| 57 | + #[unstable(issue = "0")] //~ ERROR missing 'feature' [E0546] |
58 | 58 | fn f1() { } |
59 | 59 |
|
60 | | - #[unstable(feature = "a")] //~ ERROR missing 'issue' |
| 60 | + #[unstable(feature = "a")] //~ ERROR missing 'issue' [E0547] |
61 | 61 | fn f2() { } |
62 | 62 |
|
63 | | - #[stable(since = "a")] //~ ERROR missing 'feature' |
| 63 | + #[stable(since = "a")] //~ ERROR missing 'feature' [E0546] |
64 | 64 | fn f3() { } |
65 | 65 | } |
66 | 66 |
|
67 | 67 | mod missing_version { |
68 | | - #[stable(feature = "a")] //~ ERROR missing 'since' |
| 68 | + #[stable(feature = "a")] //~ ERROR missing 'since' [E0542] |
69 | 69 | fn f1() { } |
70 | 70 |
|
71 | 71 | #[stable(feature = "a", since = "b")] |
72 | | - #[rustc_deprecated(reason = "a")] //~ ERROR missing 'since' |
| 72 | + #[rustc_deprecated(reason = "a")] //~ ERROR missing 'since' [E0542] |
73 | 73 | fn f2() { } |
74 | 74 | } |
75 | 75 |
|
76 | 76 | #[unstable(feature = "a", issue = "0")] |
77 | | -#[stable(feature = "a", since = "b")] |
78 | | -fn multiple1() { } //~ ERROR multiple stability levels |
| 77 | +#[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544] |
| 78 | +fn multiple1() { } |
79 | 79 |
|
80 | 80 | #[unstable(feature = "a", issue = "0")] |
81 | | -#[unstable(feature = "a", issue = "0")] |
82 | | -fn multiple2() { } //~ ERROR multiple stability levels |
| 81 | +#[unstable(feature = "a", issue = "0")] //~ ERROR multiple stability levels [E0544] |
| 82 | +fn multiple2() { } |
83 | 83 |
|
84 | 84 | #[stable(feature = "a", since = "b")] |
85 | | -#[stable(feature = "a", since = "b")] |
86 | | -fn multiple3() { } //~ ERROR multiple stability levels |
| 85 | +#[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544] |
| 86 | +fn multiple3() { } |
87 | 87 |
|
88 | 88 | #[stable(feature = "a", since = "b")] |
89 | 89 | #[rustc_deprecated(since = "b", reason = "text")] |
90 | 90 | #[rustc_deprecated(since = "b", reason = "text")] |
91 | | -fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes |
| 91 | +fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes [E0540] |
92 | 92 | //~^ ERROR Invalid stability or deprecation version found |
93 | 93 |
|
94 | 94 | #[rustc_deprecated(since = "a", reason = "text")] |
95 | | -fn deprecated_without_unstable_or_stable() { } //~ ERROR rustc_deprecated attribute must be paired |
| 95 | +fn deprecated_without_unstable_or_stable() { } |
| 96 | +//~^ ERROR rustc_deprecated attribute must be paired with either stable or unstable attribute |
96 | 97 |
|
97 | 98 | fn main() { } |
0 commit comments