summary refs log tree commit diff
path: root/src/test/ui/specialization
AgeCommit message (Collapse)AuthorLines
2020-05-02Point at associated types when they have a default typeEsteban Küber-2/+2
Associated types with a default type in a trait can't be relied upon to remain of that default type when in use, so literals of that type can't be used in the trait's items. Point at the associated type and state that information. Reduce verbosity for associated consts of the wrong type.
2020-05-02When a projection is expected, suggest constraining or calling methodEsteban Küber-2/+2
2020-05-02On type mismatch involving associated type, suggest constraintEsteban Küber-2/+2
When an associated type is found when a specific type was expected, if possible provide a structured suggestion constraining the associated type in a bound. ``` error[E0271]: type mismatch resolving `<T as Foo>::Y == i32` --> $DIR/associated-types-multiple-types-one-trait.rs:13:5 | LL | want_y(t); | ^^^^^^ expected `i32`, found associated type ... LL | fn want_y<T:Foo<Y=i32>>(t: &T) { } | ----- required by this bound in `want_y` | = note: expected type `i32` found associated type `<T as Foo>::Y` help: consider constraining the associated type `<T as Foo>::Y` to `i32` | LL | fn have_x_want_y<T:Foo<X=u32, Y = i32>>(t: &T) | ^^^^^^^^^ ``` ``` error[E0308]: mismatched types --> $DIR/trait-with-missing-associated-type-restriction.rs:12:9 | LL | qux(x.func()) | ^^^^^^^^ expected `usize`, found associated type | = note: expected type `usize` found associated type `<impl Trait as Trait>::A` help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize` | LL | fn foo(x: impl Trait<A = usize>) { | ^^^^^^^^^^ ```
2020-04-24Rollup merge of #71235 - estebank:lt-sugg-2, r=ecstatic-morseDylan DPC-2/+2
Tweak `'static` suggestion code Fix #71196.
2020-04-23fix error code for E0751YI-8/+8
2020-04-22Sort `MultiSpan`s on creationEsteban Küber-2/+2
2020-04-18Do not emit note for projected derived obligationsEsteban Küber-1/+0
2020-04-18Maintain chain of derived obligationsEsteban Küber-0/+4
When evaluating the derived obligations from super traits, maintain a reference to the original obligation in order to give more actionable context in the output.
2020-03-30Add a testJonas Schievink-0/+23
2020-03-29Tweak `suggest_constraining_type_param`Esteban Küber-4/+3
Some of the bound restriction structured suggestions were incorrect while others had subpar output.
2020-03-26introduce `negative_impls` feature gate and documentNiko Matsakis-4/+5
They used to be covered by `optin_builtin_traits` but negative impls are now applicable to all traits, not just auto traits. This also adds docs in the unstable book for the current state of auto traits.
2020-03-26make a custom error for overlap with negative implsNiko Matsakis-14/+14
2020-03-26permit negative impls for non-auto traitsNiko Matsakis-8/+13
2020-03-22Tweak output for invalid negative impl errorsEsteban Küber-8/+14
2020-03-15Consider well-formed predicates in min-specializationMatthew Jasper-0/+59
2020-03-15Implement soundness check for min_specializationMatthew Jasper-0/+382
2020-03-15Add attributes to allow specializing on traitsMatthew Jasper-0/+32
2020-03-05review commentsEsteban Küber-2/+2
2020-03-04Tweak output for invalid negative impl AST errorsEsteban Küber-1/+1
2020-02-28keep predicate order and tweak outputEsteban Küber-3/+5
2020-02-28Tweak wordingEsteban Küber-1/+1
2020-02-28Mention the full path of the implementing traitEsteban Küber-1/+1
2020-02-28Track all predicates in errors, not just trait obligationsEsteban Küber-1/+3
Surface associated type projection bounds that could not be fulfilled in E0599 errors. Always present the list of unfulfilled trait bounds, regardless of whether we're pointing at the ADT or trait that didn't satisfy it.
2020-02-28Deduplicate information in E0599Esteban Küber-3/+1
2020-02-28On single local candidate, use span labelEsteban Küber-2/+3
2020-02-28Add more context to E0599 errorsEsteban Küber-2/+5
Point at the intermediary unfullfilled trait bounds.
2020-02-24add `Span` to `ast::Defaultness::Default`.Mazdak Farrokhzad-4/+6
2020-02-16Add FIXME noteYuki Okushi-0/+3
2020-02-16Add test for issue-39618Yuki Okushi-0/+24
2020-02-11Auto merge of #68929 - matprec:consistent-issue-references, r=Dylan-DPCbors-2/+2
Make issue references consistent Fixes https://github.com/rust-lang/rust/issues/62976 cc https://github.com/rust-lang/rust/pull/63008 r? @varkor because you reviewed the original pr
2020-02-09--bless --compare-mode=nllMatthias Prechtl-2/+2
2020-02-09Improve reporting errors and suggestions for trait boundsPatryk Wychowaniec-3/+7
2020-02-01Remove some unsound specializationsMatthew Jasper-0/+77
2020-01-08Unify output of "variant not found" errorsEsteban Küber-2/+2
2019-11-18Surround types with backticks in type errorsEsteban Küber-2/+2
2019-11-18review comments: tweak prefix stringsEsteban Küber-2/+2
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-8/+8
2019-10-15Handle more casesEsteban Küber-3/+3
2019-10-05Rename the testJonas Schievink-6/+6
2019-10-05Extend test and fix nitsJonas Schievink-8/+72
2019-10-05Pacify tidyJonas Schievink-2/+2
2019-10-05Test that we get the proper errorsJonas Schievink-0/+70
2019-10-05Deny specializing items not in the parent implJonas Schievink-3/+10
2019-09-21Rollup merge of #63907 - estebank:assoc-type-mismatch, r=oli-obkMazdak Farrokhzad-0/+8
Add explanation to type mismatch involving type params and assoc types CC #63711
2019-09-18Add explanation to type mismatch involving type params and assoc typesEsteban Küber-0/+8
2019-09-19Restore whitespaceJames Munns-1/+1
2019-09-19Fix a minor grammar nit, update UI testsJames Munns-2/+2
2019-09-08Give method not found a primary span labelEsteban Küber-1/+1
2019-08-20Allow 'default async fn' to parse.Mazdak Farrokhzad-0/+14
2019-08-16Update stderr files with --blesssd234678-10/+10