rust/tests/ui/auto-traits
Esteban Küber 6efddac288 Provide more context on derived obligation error primary label
Expand the primary span of E0277 when the immediate unmet bound is not what the user wrote:

```
error[E0277]: the trait bound `i32: Bar` is not satisfied
 --> f100.rs:6:6
  |
6 |     <i32 as Foo>::foo();
  |      ^^^ the trait `Bar` is not implemented for `i32`, which is required by `i32: Foo`
  |
help: this trait has no implementations, consider adding one
 --> f100.rs:2:1
  |
2 | trait Bar {}
  | ^^^^^^^^^
note: required for `i32` to implement `Foo`
 --> f100.rs:3:14
  |
3 | impl<T: Bar> Foo for T {}
  |         ---  ^^^     ^
  |         |
  |         unsatisfied trait bound introduced here
```

Fix #40120.
2024-01-30 21:28:18 +00:00
..
auto-is-contextual.rs
auto-trait-projection-recursion.rs
auto-trait-validation.fixed
auto-trait-validation.rs
auto-trait-validation.stderr
auto-traits.rs
bad-generics-on-dyn.rs
bad-generics-on-dyn.stderr
has-arguments.rs
has-arguments.stderr
issue-23080-2.current.stderr
issue-23080-2.next.stderr
issue-23080-2.rs
issue-23080.rs
issue-23080.stderr
issue-83857-ub.rs
issue-83857-ub.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-84075.rs
issue-84075.stderr
issue-117789.rs
issue-117789.stderr Bless tests 2024-01-13 12:46:58 -05:00
pre-cfg.rs
pre-cfg.stderr Bless tests 2024-01-13 12:46:58 -05:00
str-contains-slice-conceptually.rs
str-contains-slice-conceptually.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
suspicious-impls-lint.rs
suspicious-impls-lint.stderr
suspicious-negative-impls-lint.rs
suspicious-negative-impls-lint.stderr
typeck-auto-trait-no-supertraits-2.rs
typeck-auto-trait-no-supertraits-2.stderr
typeck-auto-trait-no-supertraits.rs
typeck-auto-trait-no-supertraits.stderr
typeck-default-trait-impl-constituent-types-2.rs
typeck-default-trait-impl-constituent-types-2.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
typeck-default-trait-impl-constituent-types.rs
typeck-default-trait-impl-constituent-types.stderr
typeck-default-trait-impl-negation.rs
typeck-default-trait-impl-negation.stderr
typeck-default-trait-impl-precedence.rs
typeck-default-trait-impl-precedence.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00