about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-02-19 14:46:29 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2017-02-25 18:35:26 +0200
commitc832e6f3272fd01e22a6370e7745e305fe13a4c9 (patch)
treec26d1acd868b805dbddb49259a70ff1e2b9d3548 /src/test/compile-fail
parent9890e0466d951d1b0020ae38e2a4c0d8c43cfea1 (diff)
downloadrust-c832e6f3272fd01e22a6370e7745e305fe13a4c9.tar.gz
rust-c832e6f3272fd01e22a6370e7745e305fe13a4c9.zip
rustc_typeck: rework coherence to be almost completely on-demand.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/E0117.rs2
-rw-r--r--src/test/compile-fail/coherence-cross-crate-conflict.rs1
-rw-r--r--src/test/compile-fail/coherence-default-trait-impl.rs2
-rw-r--r--src/test/compile-fail/coherence-impls-sized.rs12
4 files changed, 13 insertions, 4 deletions
diff --git a/src/test/compile-fail/E0117.rs b/src/test/compile-fail/E0117.rs
index 4ba9c3382f3..3da00da205f 100644
--- a/src/test/compile-fail/E0117.rs
+++ b/src/test/compile-fail/E0117.rs
@@ -12,6 +12,8 @@ impl Drop for u32 {} //~ ERROR E0117
 //~^ NOTE 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 the Drop trait may only be implemented on structures
+//~| implementing Drop requires a struct
 
 fn main() {
 }
diff --git a/src/test/compile-fail/coherence-cross-crate-conflict.rs b/src/test/compile-fail/coherence-cross-crate-conflict.rs
index 9f74afbb2b3..aac870293fd 100644
--- a/src/test/compile-fail/coherence-cross-crate-conflict.rs
+++ b/src/test/compile-fail/coherence-cross-crate-conflict.rs
@@ -17,6 +17,7 @@ use trait_impl_conflict::Foo;
 
 impl<A> Foo for A {
     //~^ ERROR type parameter `A` must be used as the type parameter for some local type
+    //~| ERROR conflicting implementations of trait `trait_impl_conflict::Foo` for type `isize`
 }
 
 fn main() {
diff --git a/src/test/compile-fail/coherence-default-trait-impl.rs b/src/test/compile-fail/coherence-default-trait-impl.rs
index 3d109de76cc..15a80c64f8b 100644
--- a/src/test/compile-fail/coherence-default-trait-impl.rs
+++ b/src/test/compile-fail/coherence-default-trait-impl.rs
@@ -13,9 +13,9 @@
 trait MyTrait {}
 
 impl MyTrait for .. {}
+//~^ ERROR redundant default implementations of trait `MyTrait`
 
 impl MyTrait for .. {}
-//~^ ERROR redundant default implementations of trait `MyTrait`
 
 trait MySafeTrait {}
 
diff --git a/src/test/compile-fail/coherence-impls-sized.rs b/src/test/compile-fail/coherence-impls-sized.rs
index 79767e5157b..60b5d14d158 100644
--- a/src/test/compile-fail/coherence-impls-sized.rs
+++ b/src/test/compile-fail/coherence-impls-sized.rs
@@ -27,14 +27,20 @@ impl Sized for TestE {} //~ ERROR E0322
 impl Sized for MyType {} //~ ERROR E0322
 //~^ impl of 'Sized' not allowed
 
-impl Sized for (MyType, MyType) {} //~ ERROR E0117
+impl Sized for (MyType, MyType) {} //~ ERROR E0322
+//~^ impl of 'Sized' not allowed
+//~| ERROR E0117
 
 impl Sized for &'static NotSync {} //~ ERROR E0322
 //~^ impl of 'Sized' not allowed
 
-impl Sized for [MyType] {} //~ ERROR E0117
+impl Sized for [MyType] {} //~ ERROR E0322
+//~^ impl of 'Sized' not allowed
+//~| ERROR E0117
 
-impl Sized for &'static [NotSync] {} //~ ERROR E0117
+impl Sized for &'static [NotSync] {} //~ ERROR E0322
+//~^ impl of 'Sized' not allowed
+//~| ERROR E0117
 
 fn main() {
 }