rust/tests/ui/traits/bound
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
assoc-fn-bound-root-obligation.rs Pretty print Fn traits in rustc_on_unimplemented 2023-11-02 20:57:05 +00:00
assoc-fn-bound-root-obligation.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
basic.rs
generic_trait.rs
impl-comparison-duplicates.rs
in-arc.rs
multiple.rs
not-on-bare-trait-2021.rs Avoid silencing relevant follow-up errors 2024-01-09 21:08:16 +00:00
not-on-bare-trait-2021.stderr Avoid silencing relevant follow-up errors 2024-01-09 21:08:16 +00:00
not-on-bare-trait.rs Account for multiple trait bounds in bare trait object suggestion 2024-01-03 18:59:42 +00:00
not-on-bare-trait.stderr Avoid ICE in trait without dyn lint 2024-01-29 18:33:52 +00:00
not-on-struct.rs
not-on-struct.stderr
on-structs-and-enums-in-fns.rs
on-structs-and-enums-in-fns.stderr Point out if a local trait has no implementations 2023-09-10 21:20:36 +00:00
on-structs-and-enums-in-impls.rs
on-structs-and-enums-in-impls.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
on-structs-and-enums-locals.rs
on-structs-and-enums-locals.stderr Point out if a local trait has no implementations 2023-09-10 21:20:36 +00:00
on-structs-and-enums-rpass.rs
on-structs-and-enums-static.rs Work around the fact that check_mod_type_wf may spuriously return ErrorGuaranteed, even if that error is only emitted by check_modwitem_types 2023-10-25 12:04:54 +00:00
on-structs-and-enums-static.stderr Work around the fact that check_mod_type_wf may spuriously return ErrorGuaranteed, even if that error is only emitted by check_modwitem_types 2023-10-25 12:04:54 +00:00
on-structs-and-enums-xc1.rs
on-structs-and-enums-xc1.stderr
on-structs-and-enums-xc.rs
on-structs-and-enums-xc.stderr
on-structs-and-enums.rs
on-structs-and-enums.stderr Point out if a local trait has no implementations 2023-09-10 21:20:36 +00:00
recursion.rs
same-crate-name.rs
same-crate-name.stderr
sugar.rs
sugar.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00