summary refs log tree commit diff
path: root/src/test/ui/traits
AgeCommit message (Collapse)AuthorLines
2020-05-28Account for `Self` as a type paramEsteban Küber-0/+72
2020-05-27review comments: change wording and visual outputEsteban Küber-8/+6
2020-05-27Modify wordingEsteban Küber-3/+6
2020-05-27review commentsEsteban Küber-2/+2
2020-05-27Tweak output for mismatched impl itemEsteban Küber-1/+39
Detect type parameter that might require lifetime constraint. Do not name `ReVar`s in expected/found output. Reword text suggesting to check the lifetimes.
2020-05-27Name `RegionKind::ReVar` lifetimes in diagnosticsEsteban Küber-1/+1
2020-05-27Fix spacing of expected/found notes without a labelEsteban Küber-2/+2
2020-05-22Rollup merge of #71829 - kper:issue71136, r=matthewjasperRalf Jung-0/+21
Fix suggestion to borrow in struct The corresponding issue is #71136. The compiler suggests that borrowing `the_foos` might solve the problem. This is obviously incorrect. ``` struct Foo(u8); #[derive(Clone)] struct FooHolster { the_foos: Vec<Foo>, } ``` I propose as fix to check if there is any colon in the span. However, there might a case where `my_method(B { a: 1, b : foo })` would be appropriate to show a suggestion for `&B ...`. To fix that too, we can simply check if there is a bracket in the span. This is only possible because both spans are different. Issue's span: `the_foos: Vec<Foo>` other's span: `B { a : 1, b : foo }`
2020-05-03Adding new test #71136Kevin Per-0/+21
2020-04-26Use Cell::take in a couple placesThinkChaos-2/+2
2020-04-24Rollup merge of #71235 - estebank:lt-sugg-2, r=ecstatic-morseDylan DPC-1/+1
Tweak `'static` suggestion code Fix #71196.
2020-04-23fix error code for E0751YI-15/+15
2020-04-22Sort `MultiSpan`s on creationEsteban Küber-1/+1
2020-04-18Add label to item source of bound obligationEsteban Küber-1/+1
2020-04-18Do not emit note for projected derived obligationsEsteban Küber-1/+0
2020-04-18Remove `AssocTypeBound` and propagate bound `Span`sEsteban Küber-15/+11
2020-04-18Maintain chain of derived obligationsEsteban Küber-0/+5
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-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-2/+2
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-11rustc: Add a warning count upon completionRoccoDev-1/+1
2020-04-08Small tweaks to required bound spanEsteban Küber-25/+25
2020-04-08Use `PredicateObligation`s instead of `Predicate`sEsteban Küber-17/+26
Keep more information about trait binding failures.
2020-04-05"cannot resolve" → "cannot satisfy"Esteban Küber-1/+1
2020-04-03Rollup merge of #70741 - DutchGhost:test-59023, r=CentrilMazdak Farrokhzad-0/+17
Add test for #59023 Adds a test for https://github.com/rust-lang/rust/issues/59023 Closes https://github.com/rust-lang/rust/issues/59023
2020-04-03Add test for #59023DutchGhost-0/+17
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-18/+9
2020-03-29Tweak `suggest_constraining_type_param`Esteban Küber-24/+18
Some of the bound restriction structured suggestions were incorrect while others had subpar output.
2020-03-26add test for negative specializes negativeNiko Matsakis-0/+13
2020-03-26move stderr file tooNiko Matsakis-0/+12
2020-03-26give the negative-impls-builtin test a more sensible nameNiko Matsakis-0/+0
2020-03-26comment the `typeck-negative-impls-builtin` testNiko Matsakis-0/+3
2020-03-26move feature-gate-negative-impls test to traits/negative-implsNiko Matsakis-0/+3
2020-03-26introduce `negative_impls` feature gate and documentNiko Matsakis-18/+47
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-47/+43
2020-03-26permit negative impls for non-auto traitsNiko Matsakis-7/+253
2020-03-23Rollup merge of #69942 - estebank:sized-verbose-sugg, r=matthewjasperMazdak Farrokhzad-8/+8
Increase verbosity when suggesting subtle code changes Do not suggest changes that are actually quite small inline, to minimize the likelihood of confusion. Fix #69243.
2020-03-23Rollup merge of #70227 - LeSeulArtichaut:typo-def, r=CentrilMazdak Farrokhzad-6/+5
Only display definition when suggesting a typo Closes #70206 r? @Centril
2020-03-22Use more targetted span for error labelEsteban Küber-4/+4
2020-03-22Normalize wording of privacy access labelsEsteban Küber-6/+6
2020-03-21Add explanation message for E0224Nixon Enraght-Moony-2/+6
2020-03-21Bless testsLeSeulArtichaut-6/+5
2020-03-12update testsMark Mansi-5/+5
2020-03-10review commentsEsteban Küber-6/+1
2020-03-06Suggest removal of auto trait super traits and type paramsEsteban Küber-0/+5
2020-03-06Further tweak spans in ast validation errorsEsteban Küber-2/+4
2020-03-05review commentsEsteban Küber-2/+2
2020-03-04Tweak output for invalid negative impl AST errorsEsteban Küber-7/+3
2020-02-28keep predicate order and tweak outputEsteban Küber-9/+15
2020-02-28Tweak wordingEsteban Küber-3/+3
2020-02-28Mention the full path of the implementing traitEsteban Küber-3/+3
2020-02-28On single local candidate, use span labelEsteban Küber-6/+9