rust/compiler/rustc_trait_selection/src
Nadrieril 0313eb2182
Rollup merge of #120469 - estebank:issue-40120, r=TaKO8Ki
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-31 12:10:51 +01:00
..
solve merge builtin unsize candidates again 2024-01-29 14:32:06 +01:00
traits Rollup merge of #120469 - estebank:issue-40120, r=TaKO8Ki 2024-01-31 12:10:51 +01:00
errors.rs Stop using String for error codes. 2024-01-29 07:41:41 +11:00
infer.rs Make InferCtxtExt::could_impl_trait less messed up 2024-01-13 22:00:34 +00:00
lib.rs Deeply normalize when processing registered region obligations 2024-01-30 00:06:53 +00:00
regions.rs Apply suggestions from review 2024-01-30 00:09:58 +00:00