@@ -10,36 +10,53 @@ warning: malformed `on_unimplemented` attribute
10
10
--> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:3:32
11
11
|
12
12
LL | #[diagnostic::on_unimplemented(unsupported = "foo")]
13
- | ^^^^^^^^^^^^^^^^^^^
13
+ | ^^^^^^^^^^^^^^^^^^^ invalid option found here
14
+ |
15
+ = help: only `message`, `note` and `label` are allowed as options
14
16
15
17
warning: malformed `on_unimplemented` attribute
16
18
--> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:12:50
17
19
|
18
20
LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")]
19
- | ^^^^^^^^^^^^^^^^^^^
21
+ | ^^^^^^^^^^^^^^^^^^^ invalid option found here
22
+ |
23
+ = help: only `message`, `note` and `label` are allowed as options
20
24
21
25
warning: malformed `on_unimplemented` attribute
22
26
--> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:17:50
23
27
|
24
28
LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))]
25
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
30
+ |
31
+ = help: only `message`, `note` and `label` are allowed as options
26
32
27
33
warning: malformed `on_unimplemented` attribute
28
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:22:1
34
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:22:32
29
35
|
30
36
LL | #[diagnostic::on_unimplemented = "boom"]
31
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
+ | ^^^^^^^^ invalid option found here
38
+ |
39
+ = help: only `message`, `note` and `label` are allowed as options
40
+
41
+ warning: missing options for `on_unimplemented` attribute
42
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:1
43
+ |
44
+ LL | #[diagnostic::on_unimplemented]
45
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
+ |
47
+ = help: at least one of the `message`, `note` and `label` options are expected
32
48
33
49
warning: malformed `on_unimplemented` attribute
34
50
--> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:3:32
35
51
|
36
52
LL | #[diagnostic::on_unimplemented(unsupported = "foo")]
37
- | ^^^^^^^^^^^^^^^^^^^
53
+ | ^^^^^^^^^^^^^^^^^^^ invalid option found here
38
54
|
55
+ = help: only `message`, `note` and `label` are allowed as options
39
56
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
40
57
41
58
error[E0277]: the trait bound `i32: Foo` is not satisfied
42
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31 :14
59
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:37 :14
43
60
|
44
61
LL | take_foo(1_i32);
45
62
| -------- ^^^^^ the trait `Foo` is not implemented for `i32`
@@ -52,7 +69,7 @@ help: this trait has no implementations, consider adding one
52
69
LL | trait Foo {}
53
70
| ^^^^^^^^^
54
71
note: required by a bound in `take_foo`
55
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26 :21
72
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31 :21
56
73
|
57
74
LL | fn take_foo(_: impl Foo) {}
58
75
| ^^^ required by this bound in `take_foo`
@@ -61,12 +78,13 @@ warning: malformed `on_unimplemented` attribute
61
78
--> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:12:50
62
79
|
63
80
LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")]
64
- | ^^^^^^^^^^^^^^^^^^^
81
+ | ^^^^^^^^^^^^^^^^^^^ invalid option found here
65
82
|
83
+ = help: only `message`, `note` and `label` are allowed as options
66
84
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
67
85
68
86
error[E0277]: Boom
69
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:33 :14
87
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:39 :14
70
88
|
71
89
LL | take_baz(1_i32);
72
90
| -------- ^^^^^ the trait `Baz` is not implemented for `i32`
@@ -79,7 +97,7 @@ help: this trait has no implementations, consider adding one
79
97
LL | trait Baz {}
80
98
| ^^^^^^^^^
81
99
note: required by a bound in `take_baz`
82
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:27 :21
100
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:32 :21
83
101
|
84
102
LL | fn take_baz(_: impl Baz) {}
85
103
| ^^^ required by this bound in `take_baz`
@@ -88,12 +106,13 @@ warning: malformed `on_unimplemented` attribute
88
106
--> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:17:50
89
107
|
90
108
LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))]
91
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
92
110
|
111
+ = help: only `message`, `note` and `label` are allowed as options
93
112
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
94
113
95
114
error[E0277]: Boom
96
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:35 :15
115
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:41 :15
97
116
|
98
117
LL | take_boom(1_i32);
99
118
| --------- ^^^^^ the trait `Boom` is not implemented for `i32`
@@ -106,11 +125,39 @@ help: this trait has no implementations, consider adding one
106
125
LL | trait Boom {}
107
126
| ^^^^^^^^^^
108
127
note: required by a bound in `take_boom`
109
- --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:28 :22
128
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:33 :22
110
129
|
111
130
LL | fn take_boom(_: impl Boom) {}
112
131
| ^^^^ required by this bound in `take_boom`
113
132
114
- error: aborting due to 3 previous errors; 8 warnings emitted
133
+ warning: missing options for `on_unimplemented` attribute
134
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:1
135
+ |
136
+ LL | #[diagnostic::on_unimplemented]
137
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
138
+ |
139
+ = help: at least one of the `message`, `note` and `label` options are expected
140
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
141
+
142
+ error[E0277]: the trait bound `i32: Whatever` is not satisfied
143
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:43:19
144
+ |
145
+ LL | take_whatever(1_i32);
146
+ | ------------- ^^^^^ the trait `Whatever` is not implemented for `i32`
147
+ | |
148
+ | required by a bound introduced by this call
149
+ |
150
+ help: this trait has no implementations, consider adding one
151
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:29:1
152
+ |
153
+ LL | trait Whatever {}
154
+ | ^^^^^^^^^^^^^^
155
+ note: required by a bound in `take_whatever`
156
+ --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:34:26
157
+ |
158
+ LL | fn take_whatever(_: impl Whatever) {}
159
+ | ^^^^^^^^ required by this bound in `take_whatever`
160
+
161
+ error: aborting due to 4 previous errors; 10 warnings emitted
115
162
116
163
For more information about this error, try `rustc --explain E0277`.
0 commit comments