diff options
| author | leonardo.yvens <leoyvens@gmail.com> | 2017-12-03 20:07:50 -0200 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-01-13 18:48:00 +0300 |
| commit | edd52b197555ed047db0dfb2a881a5f74635be57 (patch) | |
| tree | 8a654d346509d762bd674c99fd9952b268f15e0f /src/test/compile-fail | |
| parent | 02b5fee7325bc0f1c8adb1dedb4fd617aa9155a3 (diff) | |
| download | rust-edd52b197555ed047db0dfb2a881a5f74635be57.tar.gz rust-edd52b197555ed047db0dfb2a881a5f74635be57.zip | |
Remove wfcheck for auto traits, remove dead error codes
The WF checks are now done as an AST validation.
Diffstat (limited to 'src/test/compile-fail')
4 files changed, 5 insertions, 9 deletions
diff --git a/src/test/compile-fail/auto-trait-validation.rs b/src/test/compile-fail/auto-trait-validation.rs index b28b776d9c2..782e352c471 100644 --- a/src/test/compile-fail/auto-trait-validation.rs +++ b/src/test/compile-fail/auto-trait-validation.rs @@ -11,12 +11,9 @@ #![feature(optin_builtin_traits)] auto trait Generic<T> {} -//~^ ERROR auto traits cannot have generics -//~^^ traits with auto impls (`e.g. impl Trait for ..`) can not have type parameters +//~^ Auto traits cannot have type parameters [E0567] auto trait Bound : Copy {} -//~^ ERROR auto traits cannot have super traits -//~^^ traits with auto impls (`e.g. impl Trait for ..`) cannot have predicates +//~^ Auto traits cannot have predicates [E0568] auto trait MyTrait { fn foo() {} } -//~^ ERROR auto traits cannot contain items -//~^^ traits with default impls (`e.g. impl Trait for ..`) must have no methods or associated items +//~^ Auto traits cannot have methods or associated items [E0380] 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 a01bc791a45..751d0a14c57 100644 --- a/src/test/compile-fail/coherence-default-trait-impl.rs +++ b/src/test/compile-fail/coherence-default-trait-impl.rs @@ -14,13 +14,11 @@ auto trait MySafeTrait {} struct Foo; -#[allow(auto_impl)] unsafe impl MySafeTrait for Foo {} //~^ ERROR implementing the trait `MySafeTrait` is not unsafe unsafe auto trait MyUnsafeTrait {} -#[allow(auto_impl)] impl MyUnsafeTrait for Foo {} //~^ ERROR the trait `MyUnsafeTrait` requires an `unsafe impl` declaration diff --git a/src/test/compile-fail/issue-23080-2.rs b/src/test/compile-fail/issue-23080-2.rs index 0be80f41661..2aa87f8424b 100644 --- a/src/test/compile-fail/issue-23080-2.rs +++ b/src/test/compile-fail/issue-23080-2.rs @@ -22,4 +22,5 @@ fn call_method<T: Trait>(x: T) {} fn main() { // ICE call_method(()); + //~^ ERROR } diff --git a/src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs b/src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs index 61c504d3e1b..59d5dc6c58b 100644 --- a/src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs +++ b/src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs @@ -22,6 +22,6 @@ fn copy<T: Magic>(x: T) -> (T, T) { (x, x) } struct NoClone; fn main() { - let (a, b) = copy(NoClone); + let (a, b) = copy(NoClone); //~ ERROR println!("{:?} {:?}", a, b); } |
