Add missing files

This commit is contained in:
Georg Semmler 2018-12-29 02:13:06 +01:00
parent d6ffd88d21
commit 2bc436e713
No known key found for this signature in database
GPG key ID: A87BCEE5205CE489
100 changed files with 1018 additions and 137 deletions

View file

@ -0,0 +1,23 @@
pub trait Backend{}
pub trait SupportsDefaultKeyword {}
impl SupportsDefaultKeyword for Postgres {}
pub struct Postgres;
impl Backend for Postgres {}
pub struct AstPass<DB>(::std::marker::PhantomData<DB>);
pub trait QueryFragment<DB: Backend> {}
#[derive(Debug, Clone, Copy)]
pub struct BatchInsert<'a, T: 'a, Tab> {
_marker: ::std::marker::PhantomData<(&'a T, Tab)>,
}
impl<'a, T:'a, Tab, DB> QueryFragment<DB> for BatchInsert<'a, T, Tab>
where DB: SupportsDefaultKeyword + Backend,
{}

View file

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-all-remote.rs:6:1
--> $DIR/coherence-all-remote.rs:9:1
|
LL | impl<T> Remote1<T> for isize { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type

View file

@ -0,0 +1,11 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-all-remote.rs:9:1
|
LL | impl<T> Remote1<T> for isize { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type
|
= note: only traits defined in the current crate can be implemented for a type parameter
error: aborting due to previous error
For more information about this error, try `rustc --explain E0210`.

View file

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-bigint-param.rs:8:1
--> $DIR/coherence-bigint-param.rs:11:1
|
LL | impl<T> Remote1<BigInt> for T { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type

View file

@ -0,0 +1,11 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-bigint-param.rs:11:1
|
LL | impl<T> Remote1<BigInt> for T { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type
|
= note: only traits defined in the current crate can be implemented for a type parameter
error: aborting due to previous error
For more information about this error, try `rustc --explain E0210`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `MyTrait`:
--> $DIR/coherence-blanket-conflicts-with-blanket-implemented.rs:24:1
--> $DIR/coherence-blanket-conflicts-with-blanket-implemented.rs:28:1
|
LL | impl<T:Even> MyTrait for T {
| -------------------------- first implementation here
...
LL | impl<T:Odd> MyTrait for T { //~ ERROR E0119
LL | impl<T:Odd> MyTrait for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error: aborting due to previous error

View file

@ -0,0 +1,12 @@
error[E0119]: conflicting implementations of trait `MyTrait`:
--> $DIR/coherence-blanket-conflicts-with-blanket-implemented.rs:28:1
|
LL | impl<T:Even> MyTrait for T {
| -------------------------- first implementation here
...
LL | impl<T:Odd> MyTrait for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `MyTrait`:
--> $DIR/coherence-blanket-conflicts-with-blanket-unimplemented.rs:20:1
--> $DIR/coherence-blanket-conflicts-with-blanket-unimplemented.rs:24:1
|
LL | impl<T:Even> MyTrait for T {
| -------------------------- first implementation here
...
LL | impl<T:Odd> MyTrait for T { //~ ERROR E0119
LL | impl<T:Odd> MyTrait for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error: aborting due to previous error

View file

@ -0,0 +1,12 @@
error[E0119]: conflicting implementations of trait `MyTrait`:
--> $DIR/coherence-blanket-conflicts-with-blanket-unimplemented.rs:24:1
|
LL | impl<T:Even> MyTrait for T {
| -------------------------- first implementation here
...
LL | impl<T:Odd> MyTrait for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,7 +1,7 @@
error[E0119]: conflicting implementations of trait `go_trait::GoMut` for type `MyThingy`:
--> $DIR/coherence-blanket-conflicts-with-specific-cross-crate.rs:15:1
--> $DIR/coherence-blanket-conflicts-with-specific-cross-crate.rs:18:1
|
LL | impl GoMut for MyThingy { //~ ERROR conflicting implementations
LL | impl GoMut for MyThingy {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `go_trait`:

View file

@ -0,0 +1,13 @@
error[E0119]: conflicting implementations of trait `go_trait::GoMut` for type `MyThingy`:
--> $DIR/coherence-blanket-conflicts-with-specific-cross-crate.rs:18:1
|
LL | impl GoMut for MyThingy {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `go_trait`:
- impl<G> go_trait::GoMut for G
where G: go_trait::Go;
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `MyTrait<MyType>` for type `MyType`:
--> $DIR/coherence-blanket-conflicts-with-specific-multidispatch.rs:22:1
--> $DIR/coherence-blanket-conflicts-with-specific-multidispatch.rs:26:1
|
LL | impl<T> MyTrait<T> for T {
| ------------------------ first implementation here
...
LL | impl MyTrait<MyType> for MyType { //~ ERROR E0119
LL | impl MyTrait<MyType> for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
error: aborting due to previous error

View file

@ -0,0 +1,12 @@
error[E0119]: conflicting implementations of trait `MyTrait<MyType>` for type `MyType`:
--> $DIR/coherence-blanket-conflicts-with-specific-multidispatch.rs:26:1
|
LL | impl<T> MyTrait<T> for T {
| ------------------------ first implementation here
...
LL | impl MyTrait<MyType> for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`:
--> $DIR/coherence-blanket-conflicts-with-specific-trait.rs:20:1
--> $DIR/coherence-blanket-conflicts-with-specific-trait.rs:24:1
|
LL | impl<T:OtherTrait> MyTrait for T {
| -------------------------------- first implementation here
...
LL | impl MyTrait for MyType { //~ ERROR E0119
LL | impl MyTrait for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
error: aborting due to previous error

View file

@ -0,0 +1,12 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`:
--> $DIR/coherence-blanket-conflicts-with-specific-trait.rs:24:1
|
LL | impl<T:OtherTrait> MyTrait for T {
| -------------------------------- first implementation here
...
LL | impl MyTrait for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`:
--> $DIR/coherence-blanket-conflicts-with-specific.rs:19:1
--> $DIR/coherence-blanket-conflicts-with-specific.rs:23:1
|
LL | impl<T> MyTrait for T {
| --------------------- first implementation here
...
LL | impl MyTrait for MyType { //~ ERROR E0119
LL | impl MyTrait for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
error: aborting due to previous error

View file

@ -0,0 +1,12 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `MyType`:
--> $DIR/coherence-blanket-conflicts-with-specific.rs:23:1
|
LL | impl<T> MyTrait for T {
| --------------------- first implementation here
...
LL | impl MyTrait for MyType {
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyType`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<_>`:
--> $DIR/coherence-conflicting-negative-trait-impl.rs:10:1
--> $DIR/coherence-conflicting-negative-trait-impl.rs:13:1
|
LL | unsafe impl<T: MyTrait+'static> Send for TestType<T> {}
| ---------------------------------------------------- first implementation here
@ -8,7 +8,7 @@ LL | impl<T: MyTrait> !Send for TestType<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>`
error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<i32>`:
--> $DIR/coherence-conflicting-negative-trait-impl.rs:15:1
--> $DIR/coherence-conflicting-negative-trait-impl.rs:19:1
|
LL | unsafe impl<T:'static> Send for TestType<T> {}
| ------------------------------------------- first implementation here

View file

@ -0,0 +1,21 @@
error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<_>`:
--> $DIR/coherence-conflicting-negative-trait-impl.rs:13:1
|
LL | unsafe impl<T: MyTrait+'static> Send for TestType<T> {}
| ---------------------------------------------------- first implementation here
LL |
LL | impl<T: MyTrait> !Send for TestType<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>`
error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<i32>`:
--> $DIR/coherence-conflicting-negative-trait-impl.rs:19:1
|
LL | unsafe impl<T:'static> Send for TestType<T> {}
| ------------------------------------------- first implementation here
LL |
LL | impl !Send for TestType<i32> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<i32>`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-cow.rs:28:1
--> $DIR/coherence-cow.rs:18:1
|
LL | impl<T> Remote for Pair<T,Cover<T>> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type

View file

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-cow.rs:33:1
--> $DIR/coherence-cow.rs:23:1
|
LL | impl<T> Remote for Pair<Cover<T>,T> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type

View file

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-cow.rs:38:1
--> $DIR/coherence-cow.rs:28:1
|
LL | impl<T,U> Remote for Pair<Cover<T>,U> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-cow.rs:18:1
|
LL | impl<T> Remote for Pair<T,Cover<T>> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-cow.rs:23:1
|
LL | impl<T> Remote for Pair<Cover<T>,T> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-cow.rs:28:1
|
LL | impl<T,U> Remote for Pair<Cover<T>,U> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `trait_impl_conflict::Foo` for type `isize`:
--> $DIR/coherence-cross-crate-conflict.rs:8:1
--> $DIR/coherence-cross-crate-conflict.rs:12:1
|
LL | impl<A> Foo for A {
| ^^^^^^^^^^^^^^^^^
@ -8,7 +8,7 @@ LL | impl<A> Foo for A {
- impl trait_impl_conflict::Foo for isize;
error[E0210]: type parameter `A` must be used as the type parameter for some local type (e.g., `MyStruct<A>`)
--> $DIR/coherence-cross-crate-conflict.rs:8:1
--> $DIR/coherence-cross-crate-conflict.rs:12:1
|
LL | impl<A> Foo for A {
| ^^^^^^^^^^^^^^^^^ type parameter `A` must be used as the type parameter for some local type

View file

@ -0,0 +1,21 @@
error[E0119]: conflicting implementations of trait `trait_impl_conflict::Foo` for type `isize`:
--> $DIR/coherence-cross-crate-conflict.rs:12:1
|
LL | impl<A> Foo for A {
| ^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `trait_impl_conflict`:
- impl trait_impl_conflict::Foo for isize;
error[E0210]: type parameter `A` must be used as the type parameter for some local type (e.g., `MyStruct<A>`)
--> $DIR/coherence-cross-crate-conflict.rs:12:1
|
LL | impl<A> Foo for A {
| ^^^^^^^^^^^^^^^^^ type parameter `A` must be used as the type parameter for some local type
|
= note: only traits defined in the current crate can be implemented for a type parameter
error: aborting due to 2 previous errors
Some errors occurred: E0119, E0210.
For more information about an error, try `rustc --explain E0119`.

View file

@ -1,11 +1,11 @@
error[E0199]: implementing the trait `MySafeTrait` is not unsafe
--> $DIR/coherence-default-trait-impl.rs:7:1
--> $DIR/coherence-default-trait-impl.rs:10:1
|
LL | unsafe impl MySafeTrait for Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0200]: the trait `MyUnsafeTrait` requires an `unsafe impl` declaration
--> $DIR/coherence-default-trait-impl.rs:12:1
--> $DIR/coherence-default-trait-impl.rs:16:1
|
LL | impl MyUnsafeTrait for Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -0,0 +1,16 @@
error[E0199]: implementing the trait `MySafeTrait` is not unsafe
--> $DIR/coherence-default-trait-impl.rs:10:1
|
LL | unsafe impl MySafeTrait for Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0200]: the trait `MyUnsafeTrait` requires an `unsafe impl` declaration
--> $DIR/coherence-default-trait-impl.rs:16:1
|
LL | impl MyUnsafeTrait for Foo {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
Some errors occurred: E0199, E0200.
For more information about an error, try `rustc --explain E0199`.

View file

@ -1,7 +1,7 @@
error[E0412]: cannot find type `DoesNotExist` in this scope
--> $DIR/coherence-error-suppression.rs:9:14
--> $DIR/coherence-error-suppression.rs:13:14
|
LL | impl Foo for DoesNotExist {} //~ ERROR cannot find type `DoesNotExist` in this scope
LL | impl Foo for DoesNotExist {}
| ^^^^^^^^^^^^ not found in this scope
error: aborting due to previous error

View file

@ -0,0 +1,9 @@
error[E0412]: cannot find type `DoesNotExist` in this scope
--> $DIR/coherence-error-suppression.rs:13:14
|
LL | impl Foo for DoesNotExist {}
| ^^^^^^^^^^^^ not found in this scope
error: aborting due to previous error
For more information about this error, try `rustc --explain E0412`.

View file

@ -1,7 +1,7 @@
error[E0038]: the trait `NotObjectSafe` cannot be made into an object
--> $DIR/coherence-impl-trait-for-trait-object-safe.rs:7:6
--> $DIR/coherence-impl-trait-for-trait-object-safe.rs:11:6
|
LL | impl NotObjectSafe for NotObjectSafe { } //~ ERROR E0038
LL | impl NotObjectSafe for NotObjectSafe { }
| ^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
|
= note: method `eq` references the `Self` type in its arguments or return type

View file

@ -0,0 +1,11 @@
error[E0038]: the trait `NotObjectSafe` cannot be made into an object
--> $DIR/coherence-impl-trait-for-trait-object-safe.rs:11:6
|
LL | impl NotObjectSafe for NotObjectSafe { }
| ^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
|
= note: method `eq` references the `Self` type in its arguments or return type
error: aborting due to previous error
For more information about this error, try `rustc --explain E0038`.

View file

@ -1,19 +1,19 @@
error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Foo`
--> $DIR/coherence-impl-trait-for-trait.rs:9:1
--> $DIR/coherence-impl-trait-for-trait.rs:13:1
|
LL | impl Foo for Baz { } //~ ERROR E0371
LL | impl Foo for Baz { }
| ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Foo`
error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Bar`
--> $DIR/coherence-impl-trait-for-trait.rs:10:1
--> $DIR/coherence-impl-trait-for-trait.rs:16:1
|
LL | impl Bar for Baz { } //~ ERROR E0371
LL | impl Bar for Baz { }
| ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Bar`
error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Baz`
--> $DIR/coherence-impl-trait-for-trait.rs:11:1
--> $DIR/coherence-impl-trait-for-trait.rs:19:1
|
LL | impl Baz for Baz { } //~ ERROR E0371
LL | impl Baz for Baz { }
| ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Baz`
error: aborting due to 3 previous errors

View file

@ -0,0 +1,21 @@
error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Foo`
--> $DIR/coherence-impl-trait-for-trait.rs:13:1
|
LL | impl Foo for Baz { }
| ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Foo`
error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Bar`
--> $DIR/coherence-impl-trait-for-trait.rs:16:1
|
LL | impl Bar for Baz { }
| ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Bar`
error[E0371]: the object type `(dyn Baz + 'static)` automatically implements the trait `Baz`
--> $DIR/coherence-impl-trait-for-trait.rs:19:1
|
LL | impl Baz for Baz { }
| ^^^^^^^^^^^^^^^^ `(dyn Baz + 'static)` automatically implements trait `Baz`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0371`.

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`:
--> $DIR/coherence-impls-copy.rs:5:1
--> $DIR/coherence-impls-copy.rs:8:1
|
LL | impl Copy for i32 {}
| ^^^^^^^^^^^^^^^^^
@ -8,7 +8,7 @@ LL | impl Copy for i32 {}
- impl std::marker::Copy for i32;
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`:
--> $DIR/coherence-impls-copy.rs:31:1
--> $DIR/coherence-impls-copy.rs:37:1
|
LL | impl Copy for &'static NotSync {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -18,7 +18,7 @@ LL | impl Copy for &'static NotSync {}
where T: ?Sized;
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:
--> $DIR/coherence-impls-copy.rs:38:1
--> $DIR/coherence-impls-copy.rs:45:1
|
LL | impl Copy for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -28,25 +28,25 @@ LL | impl Copy for &'static [NotSync] {}
where T: ?Sized;
error[E0206]: the trait `Copy` may not be implemented for this type
--> $DIR/coherence-impls-copy.rs:23:15
--> $DIR/coherence-impls-copy.rs:27:15
|
LL | impl Copy for &'static mut MyType {}
| ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration
error[E0206]: the trait `Copy` may not be implemented for this type
--> $DIR/coherence-impls-copy.rs:27:15
--> $DIR/coherence-impls-copy.rs:32:15
|
LL | impl Copy for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^ type is not a structure or enumeration
error[E0206]: the trait `Copy` may not be implemented for this type
--> $DIR/coherence-impls-copy.rs:34:15
--> $DIR/coherence-impls-copy.rs:40:15
|
LL | impl Copy for [MyType] {}
| ^^^^^^^^ type is not a structure or enumeration
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-copy.rs:5:1
--> $DIR/coherence-impls-copy.rs:8:1
|
LL | impl Copy for i32 {}
| ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
@ -55,7 +55,7 @@ LL | impl Copy for i32 {}
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-copy.rs:27:1
--> $DIR/coherence-impls-copy.rs:32:1
|
LL | impl Copy for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
@ -64,7 +64,7 @@ LL | impl Copy for (MyType, MyType) {}
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-copy.rs:34:1
--> $DIR/coherence-impls-copy.rs:40:1
|
LL | impl Copy for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
@ -73,7 +73,7 @@ LL | impl Copy for [MyType] {}
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-copy.rs:38:1
--> $DIR/coherence-impls-copy.rs:45:1
|
LL | impl Copy for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate

View file

@ -0,0 +1,87 @@
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`:
--> $DIR/coherence-impls-copy.rs:8:1
|
LL | impl Copy for i32 {}
| ^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl std::marker::Copy for i32;
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`:
--> $DIR/coherence-impls-copy.rs:37:1
|
LL | impl Copy for &'static NotSync {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<T> std::marker::Copy for &T
where T: ?Sized;
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:
--> $DIR/coherence-impls-copy.rs:45:1
|
LL | impl Copy for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<T> std::marker::Copy for &T
where T: ?Sized;
error[E0206]: the trait `Copy` may not be implemented for this type
--> $DIR/coherence-impls-copy.rs:27:15
|
LL | impl Copy for &'static mut MyType {}
| ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration
error[E0206]: the trait `Copy` may not be implemented for this type
--> $DIR/coherence-impls-copy.rs:32:15
|
LL | impl Copy for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^ type is not a structure or enumeration
error[E0206]: the trait `Copy` may not be implemented for this type
--> $DIR/coherence-impls-copy.rs:40:15
|
LL | impl Copy for [MyType] {}
| ^^^^^^^^ type is not a structure or enumeration
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-copy.rs:8:1
|
LL | impl Copy for i32 {}
| ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-copy.rs:32:1
|
LL | impl Copy for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-copy.rs:40:1
|
LL | impl Copy for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-copy.rs:45:1
|
LL | impl Copy for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to 10 previous errors
Some errors occurred: E0117, E0119, E0206.
For more information about an error, try `rustc --explain E0117`.

View file

@ -1,5 +1,5 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-send.rs:17:1
--> $DIR/coherence-impls-send.rs:20:1
|
LL | unsafe impl Send for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
@ -8,13 +8,13 @@ LL | unsafe impl Send for (MyType, MyType) {}
= note: define and implement a trait or new type instead
error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync`
--> $DIR/coherence-impls-send.rs:20:1
--> $DIR/coherence-impls-send.rs:24:1
|
LL | unsafe impl Send for &'static NotSync {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-send.rs:23:1
--> $DIR/coherence-impls-send.rs:28:1
|
LL | unsafe impl Send for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
@ -23,7 +23,7 @@ LL | unsafe impl Send for [MyType] {}
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-send.rs:26:1
--> $DIR/coherence-impls-send.rs:32:1
|
LL | unsafe impl Send for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate

View file

@ -0,0 +1,37 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-send.rs:20:1
|
LL | unsafe impl Send for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync`
--> $DIR/coherence-impls-send.rs:24:1
|
LL | unsafe impl Send for &'static NotSync {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-send.rs:28:1
|
LL | unsafe impl Send for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-send.rs:32:1
|
LL | unsafe impl Send for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to 4 previous errors
Some errors occurred: E0117, E0321.
For more information about an error, try `rustc --explain E0117`.

View file

@ -1,61 +1,61 @@
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:14:1
|
LL | impl Sized for TestE {} //~ ERROR E0322
| ^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:17:1
|
LL | impl Sized for MyType {} //~ ERROR E0322
LL | impl Sized for TestE {}
| ^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:22:1
|
LL | impl Sized for MyType {}
| ^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:20:1
|
LL | impl Sized for (MyType, MyType) {} //~ ERROR E0322
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:24:1
|
LL | impl Sized for &'static NotSync {} //~ ERROR E0322
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:27:1
|
LL | impl Sized for [MyType] {} //~ ERROR E0322
LL | impl Sized for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:34:1
|
LL | impl Sized for &'static NotSync {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:39:1
|
LL | impl Sized for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:31:1
--> $DIR/coherence-impls-sized.rs:46:1
|
LL | impl Sized for &'static [NotSync] {} //~ ERROR E0322
LL | impl Sized for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-sized.rs:20:1
--> $DIR/coherence-impls-sized.rs:27:1
|
LL | impl Sized for (MyType, MyType) {} //~ ERROR E0322
LL | impl Sized for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-sized.rs:27:1
--> $DIR/coherence-impls-sized.rs:39:1
|
LL | impl Sized for [MyType] {} //~ ERROR E0322
LL | impl Sized for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-sized.rs:31:1
--> $DIR/coherence-impls-sized.rs:46:1
|
LL | impl Sized for &'static [NotSync] {} //~ ERROR E0322
LL | impl Sized for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate

View file

@ -0,0 +1,67 @@
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:17:1
|
LL | impl Sized for TestE {}
| ^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:22:1
|
LL | impl Sized for MyType {}
| ^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:27:1
|
LL | impl Sized for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:34:1
|
LL | impl Sized for &'static NotSync {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:39:1
|
LL | impl Sized for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> $DIR/coherence-impls-sized.rs:46:1
|
LL | impl Sized for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-sized.rs:27:1
|
LL | impl Sized for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-sized.rs:39:1
|
LL | impl Sized for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-impls-sized.rs:46:1
|
LL | impl Sized for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to 9 previous errors
Some errors occurred: E0117, E0322.
For more information about an error, try `rustc --explain E0117`.

View file

@ -1,12 +1,12 @@
error[E0391]: cycle detected when processing `Trait`
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:12:1
|
LL | trait Trait<T> { type Assoc; }
| ^^^^^^^^^^^^^^
|
= note: ...which again requires processing `Trait`, completing the cycle
note: cycle used when coherence checking all impls of trait `Trait`
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:9:1
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:12:1
|
LL | trait Trait<T> { type Assoc; }
| ^^^^^^^^^^^^^^

View file

@ -0,0 +1,16 @@
error[E0391]: cycle detected when processing `Trait`
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:12:1
|
LL | trait Trait<T> { type Assoc; }
| ^^^^^^^^^^^^^^
|
= note: ...which again requires processing `Trait`, completing the cycle
note: cycle used when coherence checking all impls of trait `Trait`
--> $DIR/coherence-inherited-assoc-ty-cycle-err.rs:12:1
|
LL | trait Trait<T> { type Assoc; }
| ^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0391`.

View file

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-lone-type-parameter.rs:6:1
--> $DIR/coherence-lone-type-parameter.rs:9:1
|
LL | impl<T> Remote for T { }
| ^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type

View file

@ -0,0 +1,11 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-lone-type-parameter.rs:9:1
|
LL | impl<T> Remote for T { }
| ^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type
|
= note: only traits defined in the current crate can be implemented for a type parameter
error: aborting due to previous error
For more information about this error, try `rustc --explain E0210`.

View file

@ -1,5 +1,5 @@
error[E0198]: negative impls cannot be unsafe
--> $DIR/coherence-negative-impls-safe.rs:7:1
--> $DIR/coherence-negative-impls-safe.rs:10:1
|
LL | unsafe impl !Send for TestType {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -0,0 +1,9 @@
error[E0198]: negative impls cannot be unsafe
--> $DIR/coherence-negative-impls-safe.rs:10:1
|
LL | unsafe impl !Send for TestType {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0198`.

View file

@ -1,9 +1,9 @@
error[E0119]: conflicting implementations of trait `MyTrait`:
--> $DIR/coherence-no-direct-lifetime-dispatch.rs:6:1
--> $DIR/coherence-no-direct-lifetime-dispatch.rs:10:1
|
LL | impl<T> MyTrait for T {}
| --------------------- first implementation here
LL | impl<T: 'static> MyTrait for T {} //~ ERROR E0119
LL | impl<T: 'static> MyTrait for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error: aborting due to previous error

View file

@ -0,0 +1,11 @@
error[E0119]: conflicting implementations of trait `MyTrait`:
--> $DIR/coherence-no-direct-lifetime-dispatch.rs:10:1
|
LL | impl<T> MyTrait for T {}
| --------------------- first implementation here
LL | impl<T: 'static> MyTrait for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,5 +1,5 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-orphan.rs:11:1
--> $DIR/coherence-orphan.rs:13:1
|
LL | impl TheTrait<usize> for isize { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
@ -8,7 +8,7 @@ LL | impl TheTrait<usize> for isize { }
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-orphan.rs:18:1
--> $DIR/coherence-orphan.rs:21:1
|
LL | impl !Send for Vec<isize> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate

View file

@ -0,0 +1,21 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-orphan.rs:13:1
|
LL | impl TheTrait<usize> for isize { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-orphan.rs:21:1
|
LL | impl !Send for Vec<isize> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0117`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `From<(_,)>` for type `(_,)`:
--> $DIR/coherence-overlap-all-t-and-tuple.rs:16:1
--> $DIR/coherence-overlap-all-t-and-tuple.rs:20:1
|
LL | impl <T> From<T> for T {
| ---------------------- first implementation here
...
LL | impl <T11, U11> From<(U11,)> for (T11,) { //~ ERROR E0119
LL | impl <T11, U11> From<(U11,)> for (T11,) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_,)`
error: aborting due to previous error

View file

@ -0,0 +1,12 @@
error[E0119]: conflicting implementations of trait `From<(_,)>` for type `(_,)`:
--> $DIR/coherence-overlap-all-t-and-tuple.rs:20:1
|
LL | impl <T> From<T> for T {
| ---------------------- first implementation here
...
LL | impl <T11, U11> From<(U11,)> for (T11,) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_,)`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,18 +1,18 @@
error[E0592]: duplicate definitions with name `dummy`
--> $DIR/coherence-overlap-downstream-inherent.rs:7:26
--> $DIR/coherence-overlap-downstream-inherent.rs:11:26
|
LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } }
| ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
LL | //~^ ERROR E0592
...
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:18:38
|
LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
| ^^^^^^^^^^^^^^ duplicate definitions for `f`
LL | //~^ ERROR E0592
...
LL | impl<X> A<i32, X> { fn f(&self) {} }
| -------------- other definition for `f`
|

View file

@ -0,0 +1,23 @@
error[E0592]: duplicate definitions with name `dummy`
--> $DIR/coherence-overlap-downstream-inherent.rs:11:26
|
LL | impl<T:Sugar> Sweet<T> { fn dummy(&self) { } }
| ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
...
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:18:38
|
LL | impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
| ^^^^^^^^^^^^^^ duplicate definitions for `f`
...
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`.

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `Sweet`:
--> $DIR/coherence-overlap-downstream.rs:8:1
--> $DIR/coherence-overlap-downstream.rs:12: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:19:1
|
LL | impl<X, T> Foo<X> for T where T: Bar<X> {}
| --------------------------------------- first implementation here

View file

@ -0,0 +1,21 @@
error[E0119]: conflicting implementations of trait `Sweet`:
--> $DIR/coherence-overlap-downstream.rs:12: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:19: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`.

View file

@ -1,9 +1,9 @@
error[E0592]: duplicate definitions with name `dummy`
--> $DIR/coherence-overlap-issue-23516-inherent.rs:9:25
--> $DIR/coherence-overlap-issue-23516-inherent.rs:13:25
|
LL | impl<T:Sugar> Cake<T> { fn dummy(&self) { } }
| ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
LL | //~^ ERROR E0592
...
LL | impl<U:Sugar> Cake<Box<U>> { fn dummy(&self) { } }
| ------------------- other definition for `dummy`
|

View file

@ -0,0 +1,14 @@
error[E0592]: duplicate definitions with name `dummy`
--> $DIR/coherence-overlap-issue-23516-inherent.rs:13:25
|
LL | impl<T:Sugar> Cake<T> { fn dummy(&self) { } }
| ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
...
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`.

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `Sweet` for type `std::boxed::Box<_>`:
--> $DIR/coherence-overlap-issue-23516.rs:8:1
--> $DIR/coherence-overlap-issue-23516.rs:12:1
|
LL | impl<T:Sugar> Sweet for T { }
| ------------------------- first implementation here

View file

@ -0,0 +1,13 @@
error[E0119]: conflicting implementations of trait `Sweet` for type `std::boxed::Box<_>`:
--> $DIR/coherence-overlap-issue-23516.rs:12:1
|
LL | impl<T:Sugar> Sweet for T { }
| ------------------------- first implementation here
LL | impl<U:Sugar> Sweet for Box<U> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::boxed::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`.

View file

@ -1,42 +1,42 @@
error[E0119]: conflicting implementations of trait `Foo`:
--> $DIR/coherence-overlap-messages.rs:4:1
--> $DIR/coherence-overlap-messages.rs:8:1
|
LL | impl<T> Foo for T {}
| ----------------- first implementation here
LL | impl<U> Foo for U {} //~ ERROR conflicting implementations of trait `Foo`:
LL | impl<U> Foo for U {}
| ^^^^^^^^^^^^^^^^^ conflicting implementation
error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`:
--> $DIR/coherence-overlap-messages.rs:9:1
--> $DIR/coherence-overlap-messages.rs:16:1
|
LL | impl<T> Bar for (T, u8) {}
| ----------------------- first implementation here
LL | impl<T> Bar for (u8, T) {} //~ ERROR conflicting implementations of trait `Bar` for type `(u8, u8)`:
LL | impl<T> Bar for (u8, T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(u8, u8)`
error[E0119]: conflicting implementations of trait `Baz<u8>` for type `u8`:
--> $DIR/coherence-overlap-messages.rs:14:1
--> $DIR/coherence-overlap-messages.rs:23:1
|
LL | impl<T> Baz<u8> for T {}
| --------------------- first implementation here
LL | impl<T> Baz<T> for u8 {} //~ ERROR conflicting implementations of trait `Baz<u8>` for type `u8`:
LL | impl<T> Baz<T> for u8 {}
| ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u8`
error[E0119]: conflicting implementations of trait `Quux<_, _>`:
--> $DIR/coherence-overlap-messages.rs:19:1
--> $DIR/coherence-overlap-messages.rs:30:1
|
LL | impl<T, U, V> Quux<U, V> for T {}
| ------------------------------ first implementation here
LL | impl<T, U> Quux<U, U> for T {} //~ ERROR conflicting implementations of trait `Quux<_, _>`:
LL | impl<T, U> Quux<U, U> for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error[E0119]: conflicting implementations of trait `Quux<_, _>`:
--> $DIR/coherence-overlap-messages.rs:20:1
--> $DIR/coherence-overlap-messages.rs:33:1
|
LL | impl<T, U, V> Quux<U, V> for T {}
| ------------------------------ first implementation here
LL | impl<T, U> Quux<U, U> for T {} //~ ERROR conflicting implementations of trait `Quux<_, _>`:
LL | impl<T, V> Quux<T, V> for T {} //~ ERROR conflicting implementations of trait `Quux<_, _>`:
...
LL | impl<T, V> Quux<T, V> for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error: aborting due to 5 previous errors

View file

@ -0,0 +1,44 @@
error[E0119]: conflicting implementations of trait `Foo`:
--> $DIR/coherence-overlap-messages.rs:8:1
|
LL | impl<T> Foo for T {}
| ----------------- first implementation here
LL | impl<U> Foo for U {}
| ^^^^^^^^^^^^^^^^^ conflicting implementation
error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`:
--> $DIR/coherence-overlap-messages.rs:16:1
|
LL | impl<T> Bar for (T, u8) {}
| ----------------------- first implementation here
LL | impl<T> Bar for (u8, T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(u8, u8)`
error[E0119]: conflicting implementations of trait `Baz<u8>` for type `u8`:
--> $DIR/coherence-overlap-messages.rs:23:1
|
LL | impl<T> Baz<u8> for T {}
| --------------------- first implementation here
LL | impl<T> Baz<T> for u8 {}
| ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `u8`
error[E0119]: conflicting implementations of trait `Quux<_, _>`:
--> $DIR/coherence-overlap-messages.rs:30:1
|
LL | impl<T, U, V> Quux<U, V> for T {}
| ------------------------------ first implementation here
LL | impl<T, U> Quux<U, U> for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error[E0119]: conflicting implementations of trait `Quux<_, _>`:
--> $DIR/coherence-overlap-messages.rs:33:1
|
LL | impl<T, U, V> Quux<U, V> for T {}
| ------------------------------ first implementation here
...
LL | impl<T, V> Quux<T, V> for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,9 +1,9 @@
error[E0592]: duplicate definitions with name `dummy`
--> $DIR/coherence-overlap-upstream-inherent.rs:11:32
--> $DIR/coherence-overlap-upstream-inherent.rs:15:32
|
LL | impl<T> A<T> where T: Remote { fn dummy(&self) { } }
| ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
LL | //~^ ERROR E0592
...
LL | impl A<i16> { fn dummy(&self) { } }
| ------------------- other definition for `dummy`
|

View file

@ -0,0 +1,14 @@
error[E0592]: duplicate definitions with name `dummy`
--> $DIR/coherence-overlap-upstream-inherent.rs:15:32
|
LL | impl<T> A<T> where T: Remote { fn dummy(&self) { } }
| ^^^^^^^^^^^^^^^^^^^ duplicate definitions for `dummy`
...
LL | impl A<i16> { fn dummy(&self) { } }
| ------------------- other definition for `dummy`
|
= note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions
error: aborting due to previous error
For more information about this error, try `rustc --explain E0592`.

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `Foo` for type `i16`:
--> $DIR/coherence-overlap-upstream.rs:12:1
--> $DIR/coherence-overlap-upstream.rs:16:1
|
LL | impl<T> Foo for T where T: Remote {}
| --------------------------------- first implementation here

View file

@ -0,0 +1,13 @@
error[E0119]: conflicting implementations of trait `Foo` for type `i16`:
--> $DIR/coherence-overlap-upstream.rs:16:1
|
LL | impl<T> Foo for T where T: Remote {}
| --------------------------------- first implementation here
LL | impl Foo for i16 {}
| ^^^^^^^^^^^^^^^^ conflicting implementation for `i16`
|
= note: upstream crates may add new impl of trait `coherence_lib::Remote` for type `i16` in future versions
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-overlapping-pairs.rs:8:1
--> $DIR/coherence-overlapping-pairs.rs:11:1
|
LL | impl<T> Remote for lib::Pair<T,Foo> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-overlapping-pairs.rs:11:1
|
LL | impl<T> Remote for lib::Pair<T,Foo> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-pair-covered-uncovered-1.rs:11:1
--> $DIR/coherence-pair-covered-uncovered-1.rs:15:1
|
LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-pair-covered-uncovered-1.rs:15:1
|
LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-pair-covered-uncovered.rs:8:1
--> $DIR/coherence-pair-covered-uncovered.rs:11:1
|
LL | impl<T,U> Remote for Pair<T,Local<U>> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-pair-covered-uncovered.rs:11:1
|
LL | impl<T,U> Remote for Pair<T,Local<U>> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`:
--> $DIR/coherence-projection-conflict-orphan.rs:16:1
--> $DIR/coherence-projection-conflict-orphan.rs:19:1
|
LL | impl Foo<i32> for i32 { }
| --------------------- first implementation here
LL |
LL | impl<A:Iterator> Foo<A::Item> for A { } //~ ERROR E0119
LL | impl<A:Iterator> Foo<A::Item> for A { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
|
= note: upstream crates may add new impl of trait `std::iter::Iterator` for type `i32` in future versions

View file

@ -0,0 +1,14 @@
error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`:
--> $DIR/coherence-projection-conflict-orphan.rs:19:1
|
LL | impl Foo<i32> for i32 { }
| --------------------- first implementation here
LL |
LL | impl<A:Iterator> Foo<A::Item> for A { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
|
= note: upstream crates may add new impl of trait `std::iter::Iterator` for type `i32` in future versions
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `Foo<_>` for type `std::option::Option<_>`:
--> $DIR/coherence-projection-conflict-ty-param.rs:10:1
--> $DIR/coherence-projection-conflict-ty-param.rs:14:1
|
LL | impl <P, T: Foo<P>> Foo<P> for Option<T> {}
| ---------------------------------------- first implementation here
LL |
LL | impl<T, U> Foo<T> for Option<U> { } //~ ERROR E0119
LL | impl<T, U> Foo<T> for Option<U> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::option::Option<_>`
error: aborting due to previous error

View file

@ -0,0 +1,12 @@
error[E0119]: conflicting implementations of trait `Foo<_>` for type `std::option::Option<_>`:
--> $DIR/coherence-projection-conflict-ty-param.rs:14:1
|
LL | impl <P, T: Foo<P>> Foo<P> for Option<T> {}
| ---------------------------------------- first implementation here
LL |
LL | impl<T, U> Foo<T> for Option<U> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::option::Option<_>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`:
--> $DIR/coherence-projection-conflict.rs:11:1
--> $DIR/coherence-projection-conflict.rs:15:1
|
LL | impl Foo<i32> for i32 { }
| --------------------- first implementation here
LL |
LL | impl<A:Bar> Foo<A::Output> for A { } //~ ERROR E0119
LL | impl<A:Bar> Foo<A::Output> for A { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
error: aborting due to previous error

View file

@ -0,0 +1,12 @@
error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`:
--> $DIR/coherence-projection-conflict.rs:15:1
|
LL | impl Foo<i32> for i32 { }
| --------------------- first implementation here
LL |
LL | impl<A:Bar> Foo<A::Output> for A { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `(_, _)`:
--> $DIR/coherence-tuple-conflict.rs:15:1
--> $DIR/coherence-tuple-conflict.rs:19:1
|
LL | impl<T> MyTrait for (T,T) {
| ------------------------- first implementation here
...
LL | impl<A,B> MyTrait for (A,B) { //~ ERROR E0119
LL | impl<A,B> MyTrait for (A,B) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_, _)`
error: aborting due to previous error

View file

@ -0,0 +1,12 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `(_, _)`:
--> $DIR/coherence-tuple-conflict.rs:19:1
|
LL | impl<T> MyTrait for (T,T) {
| ------------------------- first implementation here
...
LL | impl<A,B> MyTrait for (A,B) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_, _)`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,7 +1,7 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/coherence-vec-local-2.rs:11:1
--> $DIR/coherence-vec-local-2.rs:14:1
|
LL | impl<T> Remote for Vec<Local<T>> { } //~ ERROR E0210
LL | impl<T> Remote for Vec<Local<T>> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type
|
= note: only traits defined in the current crate can be implemented for a type parameter

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-vec-local-2.rs:14:1
|
LL | impl<T> Remote for Vec<Local<T>> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -1,7 +1,7 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-vec-local.rs:11:1
--> $DIR/coherence-vec-local.rs:14:1
|
LL | impl Remote for Vec<Local> { } //~ ERROR E0117
LL | impl Remote for Vec<Local> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence-vec-local.rs:14:1
|
LL | impl Remote for Vec<Local> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyFundamentalStruct<(MyType,)>`:
--> $DIR/coherence_copy_like_err_fundamental_struct_tuple.rs:17:1
--> $DIR/coherence_copy_like_err_fundamental_struct_tuple.rs:19:1
|
LL | impl<T: lib::MyCopy> MyTrait for T { }
| ---------------------------------- first implementation here
...
LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } //~ ERROR E0119
LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>`
|
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions

View file

@ -0,0 +1,14 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyFundamentalStruct<(MyType,)>`:
--> $DIR/coherence_copy_like_err_fundamental_struct_tuple.rs:19:1
|
LL | impl<T: lib::MyCopy> MyTrait for T { }
| ---------------------------------- first implementation here
...
LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>`
|
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyStruct<MyType>`:
--> $DIR/coherence_copy_like_err_struct.rs:19:1
--> $DIR/coherence_copy_like_err_struct.rs:22:1
|
LL | impl<T: lib::MyCopy> MyTrait for T { }
| ---------------------------------- first implementation here
...
LL | impl MyTrait for lib::MyStruct<MyType> { } //~ ERROR E0119
LL | impl MyTrait for lib::MyStruct<MyType> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct<MyType>`
|
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyStruct<MyType>` in future versions

View file

@ -0,0 +1,14 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyStruct<MyType>`:
--> $DIR/coherence_copy_like_err_struct.rs:22:1
|
LL | impl<T: lib::MyCopy> MyTrait for T { }
| ---------------------------------- first implementation here
...
LL | impl MyTrait for lib::MyStruct<MyType> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct<MyType>`
|
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `lib::MyStruct<MyType>` in future versions
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,10 +1,10 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `(MyType,)`:
--> $DIR/coherence_copy_like_err_tuple.rs:18:1
--> $DIR/coherence_copy_like_err_tuple.rs:21:1
|
LL | impl<T: lib::MyCopy> MyTrait for T { }
| ---------------------------------- first implementation here
...
LL | impl MyTrait for (MyType,) { } //~ ERROR E0119
LL | impl MyTrait for (MyType,) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)`
|
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions

View file

@ -0,0 +1,14 @@
error[E0119]: conflicting implementations of trait `MyTrait` for type `(MyType,)`:
--> $DIR/coherence_copy_like_err_tuple.rs:21:1
|
LL | impl<T: lib::MyCopy> MyTrait for T { }
| ---------------------------------- first implementation here
...
LL | impl MyTrait for (MyType,) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(MyType,)`
|
= note: upstream crates may add new impl of trait `lib::MyCopy` for type `(MyType,)` in future versions
error: aborting due to previous error
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,7 +1,7 @@
error[E0599]: no method named `the_fn` found for type `&Lib::TheStruct` in the current scope
--> $DIR/coherence_inherent.rs:31:11
--> $DIR/coherence_inherent.rs:35:11
|
LL | s.the_fn(); //~ ERROR no method named `the_fn` found
LL | s.the_fn();
| ^^^^^^
|
= help: items from traits can only be used if the trait is in scope

View file

@ -0,0 +1,13 @@
error[E0599]: no method named `the_fn` found for type `&Lib::TheStruct` in the current scope
--> $DIR/coherence_inherent.rs:35:11
|
LL | s.the_fn();
| ^^^^^^
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
`use Lib::TheTrait;`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.

View file

@ -1,7 +1,7 @@
error[E0599]: no method named `the_fn` found for type `&coherence_inherent_cc_lib::TheStruct` in the current scope
--> $DIR/coherence_inherent_cc.rs:23:11
--> $DIR/coherence_inherent_cc.rs:26:11
|
LL | s.the_fn(); //~ ERROR no method named `the_fn` found
LL | s.the_fn();
| ^^^^^^
|
= help: items from traits can only be used if the trait is in scope

View file

@ -0,0 +1,13 @@
error[E0599]: no method named `the_fn` found for type `&coherence_inherent_cc_lib::TheStruct` in the current scope
--> $DIR/coherence_inherent_cc.rs:26:11
|
LL | s.the_fn();
| ^^^^^^
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a `use` for it:
`use coherence_inherent_cc_lib::TheTrait;`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.

View file

@ -1,7 +1,7 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence_local_err_struct.rs:16:1
--> $DIR/coherence_local_err_struct.rs:17:1
|
LL | impl lib::MyCopy for lib::MyStruct<MyType> { } //~ ERROR E0117
LL | impl lib::MyCopy for lib::MyStruct<MyType> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence_local_err_struct.rs:17:1
|
LL | impl lib::MyCopy for lib::MyStruct<MyType> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -1,7 +1,7 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence_local_err_tuple.rs:16:1
--> $DIR/coherence_local_err_tuple.rs:17:1
|
LL | impl lib::MyCopy for (MyType,) { } //~ ERROR E0117
LL | impl lib::MyCopy for (MyType,) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate

View file

@ -0,0 +1,12 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/coherence_local_err_tuple.rs:17:1
|
LL | impl lib::MyCopy for (MyType,) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference any types defined in this crate
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0117`.

View file

@ -0,0 +1,13 @@
#![feature(re_rebalance_coherence)]
// run-pass
// aux-build:re_rebalance_coherence_lib.rs
extern crate re_rebalance_coherence_lib as lib;
use lib::*;
struct Oracle;
impl Backend for Oracle {}
impl<'a, T:'a, Tab> QueryFragment<Oracle> for BatchInsert<'a, T, Tab> {}
fn main() {}