update tests
This commit is contained in:
parent
de53877f8b
commit
8eade3aa71
@ -1,5 +1,5 @@
|
||||
error[E0592]: duplicate definitions with name `dummy`
|
||||
--> $DIR/coherence-overlap-downstream-inherent.rs:7:26
|
||||
--> $DIR/coherence-overlap-downstream-inherent.rs:10:26
|
||||
|
|
||||
LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } }
|
||||
| ^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
|
||||
@ -8,7 +8,7 @@ LL | impl<T:Fruit> Sweet<T> { fn dummy(&self) { } }
|
||||
| --------------- other definition for `dummy`
|
||||
|
||||
error[E0592]: duplicate definitions with name `f`
|
||||
--> $DIR/coherence-overlap-downstream-inherent.rs:13:38
|
||||
--> $DIR/coherence-overlap-downstream-inherent.rs:16:38
|
||||
|
|
||||
LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
|
||||
| ^^^^^^^^^^^ duplicate definitions for `f`
|
@ -0,0 +1,23 @@
|
||||
error[E0592]: duplicate definitions with name `dummy`
|
||||
--> $DIR/coherence-overlap-downstream-inherent.rs:10:26
|
||||
|
|
||||
LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } }
|
||||
| ^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
|
||||
LL |
|
||||
LL | impl<T:Fruit> Sweet<T> { fn dummy(&self) { } }
|
||||
| --------------- other definition for `dummy`
|
||||
|
||||
error[E0592]: duplicate definitions with name `f`
|
||||
--> $DIR/coherence-overlap-downstream-inherent.rs:16:38
|
||||
|
|
||||
LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
|
||||
| ^^^^^^^^^^^ duplicate definitions for `f`
|
||||
LL |
|
||||
LL | impl<X> A<i32, X> { fn f(&self) {} }
|
||||
| ----------- other definition for `f`
|
||||
|
|
||||
= note: downstream crates may implement trait `Bar<_>` for type `i32`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0592`.
|
@ -1,3 +1,6 @@
|
||||
// revisions: old next
|
||||
//[next] compile-flags: -Ztrait-solver=next
|
||||
|
||||
// Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
|
||||
// though no impls are found.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0119]: conflicting implementations of trait `Sweet`
|
||||
--> $DIR/coherence-overlap-downstream.rs:8:1
|
||||
--> $DIR/coherence-overlap-downstream.rs:11:1
|
||||
|
|
||||
LL | impl<T:Sugar> Sweet for T { }
|
||||
| ------------------------- first implementation here
|
||||
@ -7,7 +7,7 @@ LL | impl<T:Fruit> Sweet for T { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
|
||||
|
||||
error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`
|
||||
--> $DIR/coherence-overlap-downstream.rs:14:1
|
||||
--> $DIR/coherence-overlap-downstream.rs:17:1
|
||||
|
|
||||
LL | impl<X, T> Foo<X> for T where T: Bar<X> {}
|
||||
| ----------------------- first implementation here
|
21
tests/ui/coherence/coherence-overlap-downstream.old.stderr
Normal file
21
tests/ui/coherence/coherence-overlap-downstream.old.stderr
Normal file
@ -0,0 +1,21 @@
|
||||
error[E0119]: conflicting implementations of trait `Sweet`
|
||||
--> $DIR/coherence-overlap-downstream.rs:11:1
|
||||
|
|
||||
LL | impl<T:Sugar> Sweet for T { }
|
||||
| ------------------------- first implementation here
|
||||
LL | impl<T:Fruit> Sweet for T { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
|
||||
|
||||
error[E0119]: conflicting implementations of trait `Foo<_>` for type `i32`
|
||||
--> $DIR/coherence-overlap-downstream.rs:17:1
|
||||
|
|
||||
LL | impl<X, T> Foo<X> for T where T: Bar<X> {}
|
||||
| ----------------------- first implementation here
|
||||
LL | impl<X> Foo<X> for i32 {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
|
||||
|
|
||||
= note: downstream crates may implement trait `Bar<_>` for type `i32`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0119`.
|
@ -1,3 +1,6 @@
|
||||
// revisions: old next
|
||||
//[next] compile-flags: -Ztrait-solver=next
|
||||
|
||||
// Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
|
||||
// though no impls are found.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0592]: duplicate definitions with name `dummy`
|
||||
--> $DIR/coherence-overlap-issue-23516-inherent.rs:9:25
|
||||
--> $DIR/coherence-overlap-issue-23516-inherent.rs:12:25
|
||||
|
|
||||
LL | impl<T:Sugar> Cake<T> { fn dummy(&self) { } }
|
||||
| ^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
|
@ -0,0 +1,14 @@
|
||||
error[E0592]: duplicate definitions with name `dummy`
|
||||
--> $DIR/coherence-overlap-issue-23516-inherent.rs:12:25
|
||||
|
|
||||
LL | impl<T:Sugar> Cake<T> { fn dummy(&self) { } }
|
||||
| ^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
|
||||
LL |
|
||||
LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } }
|
||||
| --------------- other definition for `dummy`
|
||||
|
|
||||
= note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0592`.
|
@ -1,3 +1,6 @@
|
||||
// revisions: old next
|
||||
//[next] compile-flags: -Ztrait-solver=next
|
||||
|
||||
// Tests that we consider `Box<U>: !Sugar` to be ambiguous, even
|
||||
// though we see no impl of `Sugar` for `Box`. Therefore, an overlap
|
||||
// error is reported for the following pair of impls (#23516).
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0119]: conflicting implementations of trait `Sweet` for type `Box<_>`
|
||||
--> $DIR/coherence-overlap-issue-23516.rs:8:1
|
||||
--> $DIR/coherence-overlap-issue-23516.rs:11:1
|
||||
|
|
||||
LL | impl<T:Sugar> Sweet for T { }
|
||||
| ------------------------- first implementation here
|
13
tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
Normal file
13
tests/ui/coherence/coherence-overlap-issue-23516.old.stderr
Normal file
@ -0,0 +1,13 @@
|
||||
error[E0119]: conflicting implementations of trait `Sweet` for type `Box<_>`
|
||||
--> $DIR/coherence-overlap-issue-23516.rs:11:1
|
||||
|
|
||||
LL | impl<T:Sugar> Sweet for T { }
|
||||
| ------------------------- first implementation here
|
||||
LL | impl<U:Sugar> Sweet for Box<U> { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>`
|
||||
|
|
||||
= note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0119`.
|
@ -1,3 +1,6 @@
|
||||
// revisions: old next
|
||||
//[next] compile-flags: -Ztrait-solver=next
|
||||
|
||||
// Tests that we consider `Box<U>: !Sugar` to be ambiguous, even
|
||||
// though we see no impl of `Sugar` for `Box`. Therefore, an overlap
|
||||
// error is reported for the following pair of impls (#23516).
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0119]: conflicting implementations of trait `From<()>` for type `S`
|
||||
--> $DIR/inter-crate-ambiguity-causes-notes.rs:9:1
|
||||
--> $DIR/inter-crate-ambiguity-causes-notes.rs:12:1
|
||||
|
|
||||
LL | impl From<()> for S {
|
||||
| ------------------- first implementation here
|
@ -0,0 +1,14 @@
|
||||
error[E0119]: conflicting implementations of trait `From<()>` for type `S`
|
||||
--> $DIR/inter-crate-ambiguity-causes-notes.rs:12:1
|
||||
|
|
||||
LL | impl From<()> for S {
|
||||
| ------------------- first implementation here
|
||||
...
|
||||
LL | impl<I> From<I> for S
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `S`
|
||||
|
|
||||
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0119`.
|
@ -1,3 +1,6 @@
|
||||
// revisions: old next
|
||||
//[next] compile-flags: -Ztrait-solver=next
|
||||
|
||||
struct S;
|
||||
|
||||
impl From<()> for S {
|
||||
|
@ -1,6 +1,3 @@
|
||||
// revisions: current next
|
||||
//[next] compile-flags: -Ztrait-solver=next
|
||||
|
||||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
type T = impl Sized;
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0119]: conflicting implementations of trait `Into<T>` for type `Foo`
|
||||
--> $DIR/coherence-treats-tait-ambig.rs:10:1
|
||||
--> $DIR/coherence-treats-tait-ambig.rs:7:1
|
||||
|
|
||||
LL | impl Into<T> for Foo {
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
@ -5,6 +5,8 @@ LL | impl<T: TraitB> Overlaps<Box<T>> for <T as TraitB>::Assoc {}
|
||||
| --------------------------------------------------------- first implementation here
|
||||
LL | impl<U: TraitB> Overlaps<U> for <U as TraitB>::Assoc {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<_ as TraitB>::Assoc`
|
||||
|
|
||||
= note: downstream crates may implement trait `TraitB` for type `std::boxed::Box<_>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
WARN rustc_trait_selection::traits::coherence expected an unknowable trait ref: <<LocalTy as Overflow>::Assoc as std::marker::Sized>
|
||||
WARN rustc_trait_selection::traits::coherence expected an unknowable trait ref: <<LocalTy as Overflow>::Assoc as std::marker::Sized>
|
||||
WARN rustc_trait_selection::traits::coherence expected an unknowable trait ref: <<LocalTy as Overflow>::Assoc as std::marker::Sized>
|
||||
WARN rustc_trait_selection::traits::coherence expected an unknowable trait ref: <<LocalTy as Overflow>::Assoc as std::marker::Sized>
|
||||
error[E0119]: conflicting implementations of trait `Trait` for type `<LocalTy as Overflow>::Assoc`
|
||||
--> $DIR/trait_ref_is_knowable-norm-overflow.rs:17:1
|
||||
|
|
||||
@ -6,6 +10,8 @@ LL | impl<T: Copy> Trait for T {}
|
||||
LL | struct LocalTy;
|
||||
LL | impl Trait for <LocalTy as Overflow>::Assoc {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<LocalTy as Overflow>::Assoc`
|
||||
|
|
||||
= note: upstream crates may add a new impl of trait `std::marker::Copy` for type `<LocalTy as Overflow>::Assoc` in future versions
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user