diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-08-24 18:20:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-24 18:20:11 +0200 |
| commit | 0fcabec6204065a66b35e3a4aed1b1d9fada409c (patch) | |
| tree | 7b2eea4e8fe4da11d52920851acb570eb99ac943 /src | |
| parent | e802df9e8b2232b7a105eba75852c55f33019c1b (diff) | |
| parent | 4da14ef50eb697298f36d41f91cb02dc800275bf (diff) | |
Rollup merge of #100888 - spastorino:coherence-negative-impls-implied-bounds, r=lcnr
Coherence negative impls implied bounds Fixes #93875 This PR is rebased on top of #100789 and it would need to include that one which is already r+ed. r? ``@nikomatsakis`` cc ``@lcnr`` (which I've talked about https://github.com/rust-lang/rust/commit/3222f420d9d2312efe0735eb48160c7b070adc54, I guess after you finish your reordering of modules and work with OutlivesEnvironmentEnv this commit can just be reverted).
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr | 11 |
2 files changed, 3 insertions, 14 deletions
diff --git a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs b/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs index 221c1bc23b3..3acf0d8d39a 100644 --- a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs +++ b/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs @@ -1,9 +1,9 @@ // revisions: stock with_negative_coherence +//[with_negative_coherence] check-pass + #![feature(negative_impls)] #![cfg_attr(with_negative_coherence, feature(with_negative_coherence))] -// FIXME: this should compile - trait MyPredicate<'a> {} impl<'a, T> !MyPredicate<'a> for &'a T where T: 'a {} @@ -12,6 +12,6 @@ trait MyTrait<'a> {} impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {} impl<'a, T> MyTrait<'a> for &'a T {} -//~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_` +//[stock]~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_` fn main() {} diff --git a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr b/src/test/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr deleted file mode 100644 index 097cc4e0fe3..00000000000 --- a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait<'_>` for type `&_` - --> $DIR/coherence-negative-outlives-lifetimes.rs:14:1 - | -LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {} - | ---------------------------------------------- first implementation here -LL | impl<'a, T> MyTrait<'a> for &'a T {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. |
