about summary refs log tree commit diff
path: root/src/test/ui/try-trait
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-592/+0
2022-12-05Tweak "the following other types implement trait"Esteban Küber-9/+2
When *any* of the suggested impls is an exact match, *only* show the exact matches. This is particularly relevant for integer types. fix fmt
2022-10-09From<Alignment> for usize & NonZeroUsizeScott McMurray-1/+1
2022-09-04Use head span for rustc_on_unimplemented's enclosing_scope attrMichael Goulet-120/+78
2022-08-18Reword "Required because of the requirements on the impl of ..."Andy Wang-1/+1
2022-04-30Bless the UI testsScott McMurray-7/+21
2022-04-30Add `do yeet` expressions to allow experimentation in nightlyScott McMurray-0/+22
Using an obviously-placeholder syntax. An RFC would still be needed before this could have any chance at stabilization, and it might be removed at any point. But I'd really like to have it in nightly at least to ensure it works well with try_trait_v2, especially as we refactor the traits.
2022-04-04Refer to the TraitRef::identity in the message to be clearerEsteban Kuber-1/+1
2022-04-04Dedup logic and improve output for other types that impl traitEsteban Kuber-3/+3
2022-04-04Fix list lengthEsteban Kuber-0/+4
2022-04-04Mention implementers of unsatisfied traitEsteban Kuber-1/+11
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 `?`.
2022-03-03Cleanup feature gates.Camille GILLOT-5/+3
2022-02-14further update `fuzzy_match_tys`lcnr-3/+3
2022-02-14Make `find_similar_impl_candidates` a little fuzzier.Ben Reeves-0/+3
2021-11-20Do not mention associated items when they introduce an obligationEsteban Kuber-100/+0
2021-08-16Use note to point at bound introducing requirementEsteban Küber-2/+5
2021-07-19Various diagnostics clean ups/tweaksEsteban Küber-20/+100
* 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-05-23Extend rustc_on_implemented to improve a ?-on-ControlFlow error messageScott McMurray-13/+11
2021-05-06Better rustc_on_unimplemented, and UI test fixesScott McMurray-0/+609