]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/typeck-default-trait-impl-trait-where-clause.rs
Make RFC 1214 warnings into errors, and rip out the "warn or err"
[rust.git] / src / test / compile-fail / typeck-default-trait-impl-trait-where-clause.rs
index 8057ca56621c12930278034aee6bc98b119f3821..ff8fbd49574917f78aac78c181fc5032a2aea6e0 100644 (file)
@@ -17,7 +17,7 @@
 
 trait NotImplemented { }
 
-trait MyTrait
+trait MyTrait: Sized
     where Option<Self> : NotImplemented
 {}
 
@@ -26,20 +26,11 @@ impl NotImplemented for i32 {}
 impl MyTrait for .. {}
 
 fn foo<T:MyTrait>() {
-    bar::<Option<T>>()
     //~^ ERROR the trait `NotImplemented` is not implemented for the type `core::option::Option<T>`
-    //
     // This should probably typecheck. This is #20671.
 }
 
 fn bar<T:NotImplemented>() { }
 
-fn test() {
-    bar::<Option<i32>>();
-    //~^ ERROR the trait `NotImplemented` is not implemented for the type `core::option::Option<i32>`
-}
-
 fn main() {
-    foo::<u32>();
-    //~^ ERROR the trait `NotImplemented` is not implemented for the type `core::option::Option<u32>`
 }