about summary refs log tree commit diff
path: root/src/test/ui/traits/inheritance
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-1080/+0
2022-08-21Prefer non-Self non-method types over Self, firstMichael Goulet-16/+16
2022-08-21Account for relative pathsMichael Goulet-2/+4
2022-08-21Rework point-at-argMichael Goulet-8/+16
2022-04-04Refer to the TraitRef::identity in the message to be clearerEsteban Kuber-3/+3
2022-04-04Dedup logic and improve output for other types that impl traitEsteban Kuber-3/+7
2022-04-04Mention implementers of unsatisfied traitEsteban Kuber-0/+4
When encountering an unsatisfied trait bound, if there are no other suggestions, mention all the types that *do* implement that trait: ``` error[E0277]: the trait bound `f32: Foo` is not satisfied --> $DIR/impl_wf.rs:22:6 | LL | impl Baz<f32> for f32 { } | ^^^^^^^^ the trait `Foo` is not implemented for `f32` | = help: the following other types implement trait `Foo`: Option<T> i32 str note: required by a bound in `Baz` --> $DIR/impl_wf.rs:18:31 | LL | trait Baz<U: ?Sized> where U: Foo { } | ^^^ required by this bound in `Baz` ``` Mention implementers of traits in `ImplObligation`s. Do not mention other `impl`s for closures, ranges and `?`.
2021-11-20Do not mention associated items when they introduce an obligationEsteban Kuber-27/+0
2021-11-20Point at source of trait bound obligations in more placesEsteban Kuber-0/+16
Be more thorough in using `ItemObligation` and `BindingObligation` when evaluating obligations so that we can point at trait bounds that introduced unfulfilled obligations. We no longer incorrectly point at unrelated trait bounds (`substs-ppaux.verbose.stderr`). In particular, we now point at trait bounds on method calls. We no longer point at "obvious" obligation sources (we no longer have a note pointing at `Trait` saying "required by a bound in `Trait`", like in `associated-types-no-suitable-supertrait*`). Address part of #89418.
2021-08-11Modify structured suggestion outputEsteban Küber-2/+2
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-07-19Various diagnostics clean ups/tweaksEsteban Küber-6/+11
* Always point at macros, including derive macros * Point at non-local items that introduce a trait requirement * On private associated item, point at definition
2021-03-18Fix use of bare trait objects everywhereVadim Petrochenkov-4/+4
2021-02-09Organize trait test filesBram van den Heuvel-0/+1068