diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-08-07 20:49:36 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-07 20:49:36 +1000 |
| commit | bcd50fd45fb92a6c96af7e91893488bd4499153c (patch) | |
| tree | 31c5bcca2a40e60d434ab0fd1821b61cfda516b4 /tests/ui/methods | |
| parent | 61cb1e97fcf954c37d0a457a8084ed9ad8b3cb82 (diff) | |
| parent | 91e606b715ac4e8f59fac86d42ec2ad23f4ef169 (diff) | |
| download | rust-bcd50fd45fb92a6c96af7e91893488bd4499153c.tar.gz rust-bcd50fd45fb92a6c96af7e91893488bd4499153c.zip | |
Rollup merge of #137831 - estebank:auto-trait-err, r=compiler-errors
Tweak auto trait errors
Make suggestions to remove params and super traits verbose and make spans 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/methods')
| -rw-r--r-- | tests/ui/methods/issues/issue-105732.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/methods/issues/issue-105732.stderr b/tests/ui/methods/issues/issue-105732.stderr index 6244f983550..93ce695f27b 100644 --- a/tests/ui/methods/issues/issue-105732.stderr +++ b/tests/ui/methods/issues/issue-105732.stderr @@ -4,7 +4,7 @@ error[E0380]: auto traits cannot have associated items LL | auto trait Foo { | --- auto traits cannot have associated items LL | fn g(&self); - | ---^-------- help: remove these associated items + | ^ error[E0599]: no method named `g` found for reference `&Self` in the current scope --> $DIR/issue-105732.rs:10:14 |
