summary refs log tree commit diff
path: root/src/test/ui/traits
AgeCommit message (Collapse)AuthorLines
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
2020-02-22Add note regarding argument orderingvarkor-0/+2
2020-02-22Move generic arg / param validation to `create_substs_for_generic_args`varkor-8/+9
2020-02-17Do not emit note suggesting to implement trait to foreign typeLeSeulArtichaut-2/+0
Update tests Extend to other operations Refractor check in a separate function Fix more tests
2020-02-13Constness -> enum Const { Yes(Span), No }Mazdak Farrokhzad-1/+5
Same idea for `Unsafety` & use new span for better diagnostics.
2020-02-09Improve reporting errors and suggestions for trait boundsPatryk Wychowaniec-14/+38
2020-02-04Auto merge of #68544 - Aaron1011:remove-overlapping-traits, r=estebankbors-30/+13
Remove the `overlapping_marker_traits` feature See #29864 This has been replaced by `#[feature(marker_trait_attr)]` A few notes: * Due to PR #68057 not yet being in the bootstrap compiler, it's necessary to continue using `#![feature(overlapping_marker_traits)]` under `#[cfg(bootstrap)]` to work around type inference issues. * I've updated tests that used `overlapping_marker_traits` to now use `marker_trait_attr` where applicable The test `src/test/ui/overlap-marker-trait.rs` doesn't make any sense now that `overlapping_marker_traits`, so I removed it. The test `src/test/ui/traits/overlap-permitted-for-marker-traits-neg.rs` now fails, since it's no longer possible to have multiple overlapping negative impls of `Send`. I believe that this is the behavior we want (assuming that `Send` is not going to become a `#[marker]` trait, so I renamed the test to `overlap-permitted-for-marker-traits-neg`
2020-02-04Remove the `overlapping_marker_traits` featureAaron Hill-30/+13
See #29864 This has been replaced by `#[feature(marker_trait_attr)]` A few notes: * Due to PR #68057 not yet being in the bootstrap compiler, it's necessary to continue using `#![feature(overlapping_marker_traits)]` under `#[cfg(bootstrap)]` to work around type inference issues. * I've updated tests that used `overlapping_marker_traits` to now use `marker_trait_attr` where applicable The test `src/test/ui/overlap-marker-trait.rs` doesn't make any sense now that `overlapping_marker_traits`, so I removed it. The test `src/test/ui/traits/overlap-permitted-for-marker-traits-neg.rs` now fails, since it's no longer possible to have multiple overlapping negative impls of `Send`. I believe that this is the behavior we want (assuming that `Send` is not going to become a `#[marker]` trait, so I renamed the test to `overlap-permitted-for-marker-traits-neg`
2020-02-03Change wording for object unsafe because of assoc constEsteban Küber-3/+3
2020-02-02Deal with spans showing `std` libEsteban Küber-2/+7
Address #53081
2020-02-02Point at reason in object unsafe trait with `Self` in supertraits or ↵Esteban Küber-1/+4
`where`-clause
2020-02-02Account for `?Sized` type parameter boundsEsteban Küber-2/+2
2020-02-02Use more appropriate spans on object unsafe traits and provide structured ↵Esteban Küber-8/+14
suggestions when possible
2020-02-02Wording changes to object unsafe trait errorsEsteban Küber-13/+33
Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920
2020-02-02Slight rewording of diagnostic messageEsteban Küber-1/+1
2020-02-02Use more accurate failed predicate spansEsteban Küber-5/+4
2020-02-02Point at arguments or output when fn obligations come from them, or ident ↵Esteban Küber-8/+8
when they don't
2020-02-02compiletest: error if `compile-fail` header in ui test.Tyler Lanphear-13/+7
2020-01-12Diagnostics should start lowercasevarkor-3/+3
2020-01-08Unify output of "variant not found" errorsEsteban Küber-14/+14
2019-12-28Ignore i586-unknown-linux-gnu and i586-unknown-musl in testsEsteban Küber-8/+11
2019-12-24Tweak errors for missing associated types and type parametersEsteban Küber-11/+11
2019-12-20Rollup merge of #67285 - ohadravid:indicate-origin-of-where-type-parameter, ↵Mazdak Farrokhzad-1/+1
r=estebank Indicate origin of where type parameter for uninferred types Based on #65951 (which is not merge yet), fixes #67277. This PR improves a little the diagnostic for code like: ``` async fn foo() { bar().await; } async fn bar<T>() -> () {} ``` by showing: ``` error[E0698]: type inside `async fn` body must be known in this context --> unresolved_type_param.rs:9:5 | 9 | bar().await; | ^^^ cannot infer type for type parameter `T` declared on the function `bar` | ... ``` (The ``` declared on the function `bar` ``` part is new) A small side note: `Vec` and `slice` seem to resist this change, because querying `item_name()` panics, and `get_opt_name()` returns `None`. r? @estebank
2019-12-20Rollup merge of #67127 - estebank:disambiguate-suggestion, r=varkorMazdak Farrokhzad-2/+8
Use structured suggestion for disambiguating method calls Fix #65635.
2019-12-19Rollup merge of #67189 - LeSeulArtichaut:binop-wording, r=estebankMazdak Farrokhzad-2/+2
Unify binop wording Closes #60497 r? @estebank
2019-12-17Revert "Auto merge of #67362 - Mark-Simulacrum:par-4-default, r=alexcrichton"Mark Rousskov-2/+18
This reverts commit 3ed3b8bb7b100afecf7d5f52eafbb70fec27f537, reversing changes made to 99b89533d4cdf7682ea4054ad0ee36c351d05df1. We will reland a similar patch at a future date but for now we should get a nightly released in a few hours with the parallel patch, so this should be reverted to make sure that the next nightly is not parallel-enabled.
2019-12-16Always build and ship parallel-enabled compilersMark Rousskov-18/+2
This also removes the unused NO_PARALLEL_COMPILER flag; if we want that functionality we can readd it but this makes sure we really are parallel everywhere. This also patches a test that has differing output in the parallel case (hopefully deterministically so!).
2019-12-14Revert "Remove `#![feature(never_type)]` from tests."Niko Matsakis-1/+1
This reverts commit 8f6197f39f7d468dfc5b2bd41dae4769992a2f83.
2019-12-14Indicate origin of where type parameter for uninferred typesOhad Ravid-1/+1
2019-12-12Update testsLeSeulArtichaut-1/+1
2019-12-12Update UI test expectationsLeSeulArtichaut-1/+1
2019-12-11Use structured suggestion for disambiguating method callsEsteban Küber-2/+8
Fix #65635.
2019-12-11Add more context for type parametersEsteban Küber-1/+1
2019-12-10Deduplicate logicEsteban Küber-2/+4
2019-12-05Rollup merge of #67011 - Aaron1011:fix/expected-found-span, r=Dylan-DPCMazdak Farrokhzad-3/+7
Include a span in more `expected...found` notes In most places, we use a span when emitting `expected...found` errors. However, there were a couple of places where we didn't use any span, resulting in hard-to-interpret error messages. This commit attaches the relevant span to these notes, and additionally switches over to using `note_expected_found` instead of manually formatting the message
2019-12-04Auto merge of #66408 - nnethercote:greedy-process_obligations, r=nmatsakisbors-1/+3
Make `process_obligations()` greedier. `process_obligations()` adds new nodes, but it does not process these new nodes until the next time it is called. This commit changes it so that it does process these new nodes within the same call. This change reduces the number of calls to `process_obligations()` required to complete processing, sometimes giving significant speed-ups. The change required some changes to tests. - The output of `cycle-cache-err-60010.rs` is slightly different. - The unit tests required extra cases to handle the earlier processing of the added nodes. I mostly did these in the simplest possible way, by making the added nodes be ignored, thus giving outcomes the same as with the old behaviour. But I changed `success_in_grandchildren()` more extensively so that some obligations are completed earlier than they used to be. r? @nikomatsakis
2019-12-03Include a span in more `expected...found` notesAaron Hill-3/+7
In most places, we use a span when emitting `expected...found` errors. However, there were a couple of places where we didn't use any span, resulting in hard-to-interpret error messages. This commit attaches the relevant span to these notes, and additionally switches over to using `note_expected_found` instead of manually formatting the message
2019-11-26Fix spelling typosBrian Wignall-1/+1
2019-11-24fixup! Add negative tests where the diagnostic message would be wrongTimo Freiberg-14/+103
2019-11-24Add version mismatch help message for unimplemented traitTimo Freiberg-7/+48
Issue #22750 The error reporting for E0277 (the trait `X` is not implemented for `Foo`) now checks whether `Foo` implements a trait with the same path as `X`, which probably means that the programmer wanted to actually use only one version of the trait `X` instead of the two.
2019-11-21Auto merge of #66610 - alexreg:trait-upcasting-cosmetic, r=Centrilbors-2/+2
Aggregation of drive-by cosmetic changes for trait-upcasting PR Cherry-picked from #60900. As requested by @Centril (and @nikomatsakis, I believe). r? @Centril
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-2/+2
2019-11-21Auto merge of #66389 - estebank:type-err-labels, r=petrochenkovbors-15/+12
Specific labels when referring to "expected" and "found" types
2019-11-21Remove `#![feature(never_type)]` from tests.Mazdak Farrokhzad-1/+1
Also remove `never_type` the feature-gate test.
2019-11-18Surround types with backticks in type errorsEsteban Küber-2/+2
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-3/+0
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-10/+10