rust/tests/ui/auto-traits/auto-trait-validation.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-08-08 20:28:26 +08:00
error[E0567]: auto traits cannot have generic parameters
2024-02-07 10:42:01 +08:00
--> $DIR/auto-trait-validation.rs:6:19
2018-08-08 20:28:26 +08:00
|
LL | auto trait Generic<T> {}
2020-03-11 08:59:32 +08:00
| -------^^^ help: remove the parameters
| |
| auto trait cannot have generic parameters
2018-08-08 20:28:26 +08:00
2021-10-03 23:58:10 +08:00
error[E0568]: auto traits cannot have super traits or lifetime bounds
2024-02-07 10:42:01 +08:00
--> $DIR/auto-trait-validation.rs:8:17
2018-08-08 20:28:26 +08:00
|
LL | auto trait Bound : Copy {}
2021-10-03 23:58:10 +08:00
| -----^^^^^^^ help: remove the super traits or lifetime bounds
| |
| auto traits cannot have super traits or lifetime bounds
2018-08-08 20:28:26 +08:00
2021-10-03 23:58:10 +08:00
error[E0568]: auto traits cannot have super traits or lifetime bounds
2024-02-07 10:42:01 +08:00
--> $DIR/auto-trait-validation.rs:10:25
2018-08-08 20:28:26 +08:00
|
2021-10-03 23:58:10 +08:00
LL | auto trait LifetimeBound : 'static {}
| -------------^^^^^^^^^^ help: remove the super traits or lifetime bounds
| |
| auto traits cannot have super traits or lifetime bounds
2021-10-03 23:58:10 +08:00
error[E0380]: auto traits cannot have associated items
2024-02-07 10:42:01 +08:00
--> $DIR/auto-trait-validation.rs:12:25
2021-10-03 23:58:10 +08:00
|
LL | auto trait MyTrait { fn foo() {} }
| ------- ---^^^-----
| | |
| | help: remove these associated items
| auto traits cannot have associated items
2018-08-08 20:28:26 +08:00
2021-10-03 23:58:10 +08:00
error: aborting due to 4 previous errors
2018-08-08 20:28:26 +08:00
2019-10-08 19:51:58 +08:00
Some errors have detailed explanations: E0380, E0567, E0568.
2019-10-07 20:08:26 +08:00
For more information about an error, try `rustc --explain E0380`.