rust/tests/ui/associated-type-bounds
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
return-type-notation Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
ambiguous-associated-type2.rs
ambiguous-associated-type2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
ambiguous-associated-type.rs
assoc-type-bound-through-where-clause.rs
assoc-type-eq-with-dyn-atb-fail.rs
assoc-type-eq-with-dyn-atb-fail.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-item-through-where-clause.rs
bad-bounds-on-assoc-in-trait.rs
bad-bounds-on-assoc-in-trait.stderr
bad-universal-in-dyn-in-where-clause.rs
bad-universal-in-dyn-in-where-clause.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
bad-universal-in-impl-sig.rs
bad-universal-in-impl-sig.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
binder-on-bound.rs
binder-on-bound.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
bounds-on-assoc-in-trait.rs
bounds-on-assoc-in-trait.stderr
const-projection-err.gce.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const-projection-err.rs
const-projection-err.stock.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
consts.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
consts.stderr Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs
do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
duplicate.rs Avoid silencing relevant follow-up errors 2024-01-09 21:08:16 +00:00
duplicate.stderr Avoid silencing relevant follow-up errors 2024-01-09 21:08:16 +00:00
dyn-impl-trait-type.rs
dyn-rpit-and-let.rs
elision.rs
elision.stderr
entails-sized-object-safety.rs
enum-bounds.rs
fn-apit.rs
fn-aux.rs
fn-dyn-apit.rs
fn-inline.rs
fn-where.rs
fn-wrap-apit.rs
handle-predicates-that-can-define-assoc-type.rs
hrtb.rs
implied-in-supertrait.rs
implied-region-constraints.rs
implied-region-constraints.stderr
inside-adt.rs
inside-adt.stderr
issue-61752.rs
issue-70292.rs
issue-71443-1.rs
issue-71443-1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-71443-2.rs
issue-73818.rs
issue-79949.rs
issue-81193.rs
issue-83017.rs
issue-99828.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
issue-99828.stderr Bless tests 2024-01-13 12:46:58 -05:00
issue-102335-ty.rs
issue-102335-ty.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-104916.rs
issue-104916.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
missing-trait-bound-for-assoc-fails.rs
missing-trait-bound-for-assoc-fails.stderr
order-dependent-bounds-issue-54121.rs
overlaping-bound-suggestion.rs
overlaping-bound-suggestion.stderr
rpit.rs
struct-bounds.rs
suggest-contraining-assoc-type-because-of-assoc-const.fixed
suggest-contraining-assoc-type-because-of-assoc-const.rs
suggest-contraining-assoc-type-because-of-assoc-const.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
suggest-removing-impl.rs
suggest-removing-impl.stderr
supertrait-defines-ty.rs
supertrait-referencing-self.rs
supertrait-referencing.rs
supertrait-where-referencing-self.rs
trait-alias-impl-trait.rs
trait-params.rs
traits-assoc-anonymized.rs
traits-assoc-type-macros.rs
type-alias.rs
type-alias.stderr
union-bounds.rs