rust/tests/ui/traits/alias
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
..
auxiliary
ambiguous.rs
ambiguous.stderr
basic.rs
bounds.rs
cross-crate.rs
cross-crate.stderr
dont-elaborate-non-self.rs
dont-elaborate-non-self.stderr
generic-default-in-dyn.rs
generic-default-in-dyn.stderr
impl.rs
impl.stderr
import-cross-crate.rs
import.rs
issue-60021-assoc-method-resolve.rs
issue-60755.rs
issue-72415-assoc-const-resolve.rs
issue-75983.rs
issue-83613.rs
issue-83613.stderr
issue-107747-do-not-assemble-supertraits.rs
issue-108072-unmet-trait-alias-bound.rs
issue-108072-unmet-trait-alias-bound.stderr
issue-108132-unmet-trait-alias-bound-on-generic-impl.rs
issue-108132-unmet-trait-alias-bound-on-generic-impl.stderr
maybe-bound.rs
no-duplicates.rs
no-duplicates.stderr
no-extra-traits.rs
no-extra-traits.stderr
object-fail.rs
object-fail.stderr
object-wf.rs
object.rs
only-maybe-bound.rs
only-maybe-bound.stderr
self-in-const-generics.rs
self-in-const-generics.stderr
self-in-generics.rs
self-in-generics.stderr
style_lint.rs
style_lint.stderr
suggest-trait-alias-instead-of-type.fixed
suggest-trait-alias-instead-of-type.rs
suggest-trait-alias-instead-of-type.stderr
syntax-fail.rs
syntax-fail.stderr
syntax.rs
wf.rs
wf.stderr