rust/compiler/rustc_trait_selection
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
..
src Rollup merge of #120469 - estebank:issue-40120, r=TaKO8Ki 2024-01-31 12:10:51 +01:00
Cargo.toml avoid always rerunning in case of a cycle 2024-01-09 11:19:34 +01:00
messages.ftl Restrict what symbols can be used in #[diagnostic::on_unimplemented] format strings 2023-12-04 10:00:33 +01:00