Skip to content

Commit

Permalink
Add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
weiznich committed Jan 3, 2019
1 parent d6ffd88 commit 2bc436e
Show file tree
Hide file tree
Showing 100 changed files with 1,008 additions and 127 deletions.
23 changes: 23 additions & 0 deletions src/test/ui/coherence/auxiliary/re_rebalance_coherence_lib.rs
@@ -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,
{}
@@ -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
Expand Down
11 changes: 11 additions & 0 deletions src/test/ui/coherence/coherence-all-remote.re.stderr
@@ -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`.
@@ -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
Expand Down
11 changes: 11 additions & 0 deletions src/test/ui/coherence/coherence-bigint-param.re.stderr
@@ -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`.
@@ -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
Expand Down
@@ -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`.
@@ -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
Expand Down
@@ -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`.
@@ -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`:
Expand Down
@@ -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`.
@@ -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
Expand Down
@@ -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`.
@@ -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
Expand Down
@@ -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`.
@@ -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
Expand Down
@@ -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`.
@@ -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
Expand All @@ -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
Expand Down
@@ -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`.
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence-cow.a.stderr
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence-cow.b.stderr
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence-cow.c.stderr
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions src/test/ui/coherence/coherence-cow.re_a.stderr
@@ -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`.
12 changes: 12 additions & 0 deletions src/test/ui/coherence/coherence-cow.re_b.stderr
@@ -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`.
12 changes: 12 additions & 0 deletions src/test/ui/coherence/coherence-cow.re_c.stderr
@@ -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`.
@@ -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 {
| ^^^^^^^^^^^^^^^^^
Expand All @@ -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
Expand Down
21 changes: 21 additions & 0 deletions src/test/ui/coherence/coherence-cross-crate-conflict.re.stderr
@@ -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`.
@@ -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 {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
16 changes: 16 additions & 0 deletions src/test/ui/coherence/coherence-default-trait-impl.re.stderr
@@ -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`.
@@ -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
Expand Down

0 comments on commit 2bc436e

Please sign in to comment.