rust/tests/ui/auto-traits
Esteban Küber 91e606b715 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) {
   |        ^^^^^^
```
2025-08-04 17:20:07 +00:00
..
assoc-ty.current.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
assoc-ty.next.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
assoc-ty.rs adjust derive_error 2025-02-13 23:49:09 +01:00
auto-is-contextual.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
auto-trait-phantom-data-bounds.rs cleaned up some tests 2025-07-05 00:45:24 +05:00
auto-trait-phantom-data-bounds.stderr cleaned up some tests 2025-07-05 00:45:24 +05:00
auto-trait-projection-recursion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
auto-trait-validation.fixed Tweak auto trait errors 2025-08-04 17:20:07 +00:00
auto-trait-validation.rs Tweak auto trait errors 2025-08-04 17:20:07 +00:00
auto-trait-validation.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
auto-traits-type-parameter.rs cleaned up some tests 2025-07-10 18:47:20 +05:00
auto-traits.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
auto-traits.stderr Update tests 2024-02-07 10:42:01 +08:00
bad-generics-on-dyn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-generics-on-dyn.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
has-arguments.rs Extend builtin/auto trait args with error when they have >1 argument 2023-11-06 21:29:08 +00:00
has-arguments.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
issue-23080-2.current.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
issue-23080-2.next.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
issue-23080-2.rs Ignore tests w/ current/next revisions from compare-mode=next-solver 2024-03-10 21:18:41 -04:00
issue-23080.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23080.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
issue-83857-ub.rs Remove suspicious auto trait lint 2024-02-19 17:41:48 -03:00
issue-83857-ub.stderr Normalize each signature input/output in typeck_with_fallback with its own span 2025-01-06 17:58:30 +00:00
issue-84075.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84075.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
issue-117789.rs Remove suspicious auto trait lint 2024-02-19 17:41:48 -03:00
issue-117789.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
pre-cfg.rs Use cfg(false) in UI tests 2025-04-03 21:41:58 +00:00
pre-cfg.stderr Bless tests 2024-01-13 12:46:58 -05:00
str-contains-slice-conceptually.rs Treat str as containing [u8] for auto trait purposes 2023-02-25 20:01:33 +00:00
str-contains-slice-conceptually.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
typeck-auto-trait-no-supertraits-2.rs Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
typeck-auto-trait-no-supertraits-2.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
typeck-auto-trait-no-supertraits.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typeck-auto-trait-no-supertraits.stderr Tweak auto trait errors 2025-08-04 17:20:07 +00:00
typeck-default-trait-impl-constituent-types-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typeck-default-trait-impl-constituent-types-2.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
typeck-default-trait-impl-constituent-types.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typeck-default-trait-impl-constituent-types.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
typeck-default-trait-impl-negation.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typeck-default-trait-impl-negation.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typeck-default-trait-impl-precedence.rs Use root obligation on E0277 for some cases 2024-03-03 18:53:35 +00:00
typeck-default-trait-impl-precedence.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
ungated-impl.rs Delay bug for negative auto trait rather than ICEing 2025-03-07 17:20:57 +00:00
ungated-impl.stderr Delay bug for negative auto trait rather than ICEing 2025-03-07 17:20:57 +00:00