about summary refs log tree commit diff
path: root/src/test/ui/coherence
AgeCommit message (Collapse)AuthorLines
2020-04-23fix error code for E0751YI-2/+2
2020-04-11rustc: Add a warning count upon completionRoccoDev-0/+4
2020-04-08Small tweaks to required bound spanEsteban Küber-1/+1
2020-04-06traits/coherence: stop using `Ty::walk_shallow`.Eduard-Mihai Burtescu-2/+2
2020-03-26introduce `negative_impls` feature gate and documentNiko Matsakis-22/+24
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-15/+14
2020-03-05review commentsEsteban Küber-2/+3
2020-03-04Tweak output for invalid negative impl AST errorsEsteban Küber-2/+2
2020-02-13Constness -> enum Const { Yes(Span), No }Mazdak Farrokhzad-1/+3
Same idea for `Unsafety` & use new span for better diagnostics.
2020-02-09Reduce queries/map lookups done by coherenceJonas Schievink-2/+2
This has negligible perf impact, but it does improve the code a bit. * Only query the specialization graph of any trait once instead of once per impl * Loop over impls only once, precomputing impl DefId and TraitRef
2020-02-06make lint warn by defaultNiko Matsakis-12/+9
2020-02-06lint impls that will become incoherent when leak-check is removedNiko Matsakis-5/+88
2020-02-04Auto merge of #68544 - Aaron1011:remove-overlapping-traits, r=estebankbors-18/+30
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-18/+30
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-02Use more appropriate spans on object unsafe traits and provide structured ↵Esteban Küber-1/+1
suggestions when possible
2020-02-02Wording changes to object unsafe trait errorsEsteban Küber-1/+5
Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920
2020-01-08Unify output of "variant not found" errorsEsteban Küber-2/+2
2019-11-10Improve coherence errors for wrong type orderOhad Ravid-23/+46
2019-10-31Stabilize the `re_rebalance_coherence` featureOhad Ravid-1461/+204
2019-10-28Do not display ADT type arguments and fix rebaseEsteban Küber-57/+85
2019-10-28Account for tuples in explanationEsteban Küber-20/+20
2019-10-28Talk about specific types and remove lifetimes from outputEsteban Küber-16/+16
2019-10-28Further tweak spans for better readabilityEsteban Küber-16/+16
2019-10-28Use more targeted spans for orphan rule errorsEsteban Küber-154/+238
2019-10-28Call out the types that are non local on E0117Esteban Küber-42/+46
2019-10-27Rollup merge of #65738 - ↵Mazdak Farrokhzad-0/+32
ohadravid:re-rebalance-coherence-allow-fundamental-local, r=nikomatsakis Coherence should allow fundamental types to impl traits when they are local After #64414, `impl<T> Remote for Box<T> { }` is disallowed, but it is also disallowed in liballoc, where `Box` is a local type! Enabling `#![feature(re_rebalance_coherence)]` in `liballoc` results in: ``` error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct<F>`) --> src\liballoc\boxed.rs:1098:1 | 1098 | impl<F: ?Sized + Future + Unpin> Future for Box<F> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `F` must be used as the type parameter for some local type ``` This PR relaxes `uncover_fundamental_ty` to skip local fundamental types. I didn't add a test since `liballoc` already fails to compile, but I can add one if needed. r? @nikomatsakis cc #63599
2019-10-26Coherence should allow fundamental types to impl traitsOhad Ravid-0/+32
2019-10-23Auto merge of #57545 - bovinebuddha:object_safe_for_dispatch, r=nikomatsakisbors-0/+30
Object safe for dispatch cc #43561
2019-10-23Rollup merge of #65417 - weiznich:more_coherence_tests, r=nikomatsakisYuki Okushi-0/+373
Add more coherence tests I've wrote the missing test cases listed in [this google doc](https://docs.google.com/spreadsheets/d/1WlroTEXE6qxxGvEOhICkUpqguYZP9YOZEvnmEtSNtM0/edit#gid=0) > The other thing that might be useful is to rename the existing tests so they all fit the new naming scheme we were using. I'm not entirely sure how to do this. If everything from the google sheet is covered could I just remove the remaining tests in `src/test/ui/coherence` or is there something in there that should remain? cc #63599 r? @nikomatsakis
2019-10-22RFC 2027: "first draft" of implementationMathias Blikstad-0/+30
These are a squashed series of commits.
2019-10-19Fix test pathsGeorg Semmler-29/+0
2019-10-14Add more coherence testsGeorg Semmler-0/+402
2019-09-30Fixed grammar in one diagnostic and blessed tests.Alexander Regueiro-4/+4
2019-09-29Auto merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, ↵bors-16/+522
r=nikomatsakis Bugfix/rfc 2451 rerebalance tests r? @nikomatsakis Fixes #64412 Depends/Contains on #64414 cc #55437 and #63599
2019-09-24More path name fixesGeorg Semmler-2/+2
2019-09-23Remove whitespace from testnameGeorg Semmler-0/+0
2019-09-22Fix some unused variable warningsGeorg Semmler-2/+2
2019-09-19Restore whitespaceJames Munns-2/+2
2019-09-19Fix a minor grammar nit, update UI testsJames Munns-14/+14
2019-09-18Split line to fix tidyGeorg Semmler-1/+2
2019-09-18Add more testsGeorg Semmler-0/+439
2019-09-17Fix re-rebalance coherence implementation for fundamental typesGeorg Semmler-3/+21
Fixes #64412
2019-09-15Permit impls referencing errors to overlapMark Rousskov-0/+31
2019-09-13change to check-passNiko Matsakis-2/+2
2019-09-13add new tests for re_rebalance_coherenceNiko Matsakis-14/+62
2019-09-08Give method not found a primary span labelEsteban Küber-4/+4
2019-09-02account for DUMMY_SP and correct wordingEsteban Küber-2/+2
2019-09-02On object safety violation, point at source when possibleEsteban Küber-4/+4
2019-08-04Revert "Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank"Ariel Ben-Yehuda-0/+16
This reverts commit df21a6f040a7011d509769a61ac7af9502636b33, reversing changes made to cc16d0486933e02237190366de2eb43df2215c11.
2019-07-27tests: Move run-pass tests with naming conflicts to uiVadim Petrochenkov-0/+30