about summary refs log tree commit diff
path: root/compiler/rustc_ast_passes/messages.ftl
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-08-07 20:49:36 +1000
committerGitHub <noreply@github.com>2025-08-07 20:49:36 +1000
commitbcd50fd45fb92a6c96af7e91893488bd4499153c (patch)
tree31c5bcca2a40e60d434ab0fd1821b61cfda516b4 /compiler/rustc_ast_passes/messages.ftl
parent61cb1e97fcf954c37d0a457a8084ed9ad8b3cb82 (diff)
parent91e606b715ac4e8f59fac86d42ec2ad23f4ef169 (diff)
downloadrust-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 'compiler/rustc_ast_passes/messages.ftl')
-rw-r--r--compiler/rustc_ast_passes/messages.ftl2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_passes/messages.ftl b/compiler/rustc_ast_passes/messages.ftl
index 42f3569f0f1..53e64439afc 100644
--- a/compiler/rustc_ast_passes/messages.ftl
+++ b/compiler/rustc_ast_passes/messages.ftl
@@ -40,7 +40,7 @@ ast_passes_auto_generic = auto traits cannot have generic parameters
 
 ast_passes_auto_items = auto traits cannot have associated items
     .label = {ast_passes_auto_items}
-    .suggestion = remove these associated items
+    .suggestion = remove the associated items
 
 ast_passes_auto_super_lifetime = auto traits cannot have super traits or lifetime bounds
     .label = {ast_passes_auto_super_lifetime}