diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-02-28 23:37:37 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-08-04 17:20:07 +0000 |
| commit | 91e606b715ac4e8f59fac86d42ec2ad23f4ef169 (patch) | |
| tree | 78664d6652a1c1d5fde0dc0e1882544b24cef2c9 /tests/ui/traits/inductive-overflow | |
| parent | e5e79f8bd428d0b8d26e8240d718b134ef297459 (diff) | |
| download | rust-91e606b715ac4e8f59fac86d42ec2ad23f4ef169.tar.gz rust-91e606b715ac4e8f59fac86d42ec2ad23f4ef169.zip | |
Tweak auto trait errors
Make suggestions to remove params and super traits tool-only, and make
the suggestion span more accurate.
```
error[E0567]: auto traits cannot have generic parameters
--> $DIR/auto-trait-validation.rs:6:19
|
LL | auto trait Generic<T> {}
| -------^^^
| |
| auto trait cannot have generic parameters
error[E0568]: auto traits cannot have super traits or lifetime bounds
--> $DIR/auto-trait-validation.rs:8:20
|
LL | auto trait Bound : Copy {}
| ----- ^^^^
| |
| auto traits cannot have super traits or lifetime bounds
```
```
error[E0380]: auto traits cannot have associated items
--> $DIR/issue-23080.rs:5:8
|
LL | unsafe auto trait Trait {
| ----- auto traits cannot have associated items
LL | fn method(&self) {
| ^^^^^^
```
Diffstat (limited to 'tests/ui/traits/inductive-overflow')
| -rw-r--r-- | tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr b/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr index 3a3b99f6c5b..45602d676b3 100644 --- a/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr +++ b/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr @@ -1,8 +1,8 @@ error[E0568]: auto traits cannot have super traits or lifetime bounds - --> $DIR/supertrait-auto-trait.rs:8:17 + --> $DIR/supertrait-auto-trait.rs:8:19 | LL | auto trait Magic: Copy {} - | -----^^^^^^ help: remove the super traits or lifetime bounds + | ----- ^^^^ | | | auto traits cannot have super traits or lifetime bounds |
