Skip to content

Commit 8f5c235

Browse files
Add a few more cases to the unsupported_attribute.rs test
Signed-off-by: Jonathan Brouwer <[email protected]>
1 parent d1fed9c commit 8f5c235

File tree

3 files changed

+37
-8
lines changed

3 files changed

+37
-8
lines changed

tests/crashes/138510.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/ui/where-clauses/unsupported_attribute.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,8 @@ where
3333
//~| ERROR expected non-macro attribute, found attribute macro `derive`
3434
#[rustfmt::skip] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
3535
#[rustfmt::skip] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
36+
#[must_use] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
37+
#[must_use] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
38+
#[cold] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
39+
#[cold] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
3640
{}

tests/ui/where-clauses/unsupported_attribute.stderr

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,37 @@ LL | #[rustfmt::skip] 'a: 'static,
154154
|
155155
= help: only `#[cfg]` and `#[cfg_attr]` are supported
156156

157-
error: aborting due to 20 previous errors
157+
error: most attributes are not supported in `where` clauses
158+
--> $DIR/unsupported_attribute.rs:36:5
159+
|
160+
LL | #[must_use] T: Trait,
161+
| ^^^^^^^^^^^
162+
|
163+
= help: only `#[cfg]` and `#[cfg_attr]` are supported
164+
165+
error: most attributes are not supported in `where` clauses
166+
--> $DIR/unsupported_attribute.rs:37:5
167+
|
168+
LL | #[must_use] 'a: 'static,
169+
| ^^^^^^^^^^^
170+
|
171+
= help: only `#[cfg]` and `#[cfg_attr]` are supported
172+
173+
error: most attributes are not supported in `where` clauses
174+
--> $DIR/unsupported_attribute.rs:38:5
175+
|
176+
LL | #[cold] T: Trait,
177+
| ^^^^^^^
178+
|
179+
= help: only `#[cfg]` and `#[cfg_attr]` are supported
180+
181+
error: most attributes are not supported in `where` clauses
182+
--> $DIR/unsupported_attribute.rs:39:5
183+
|
184+
LL | #[cold] 'a: 'static,
185+
| ^^^^^^^
186+
|
187+
= help: only `#[cfg]` and `#[cfg_attr]` are supported
188+
189+
error: aborting due to 24 previous errors
158190

0 commit comments

Comments
 (0)