]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/object-safety-sized-2.rs
Make RFC 1214 warnings into errors, and rip out the "warn or err"
[rust.git] / src / test / compile-fail / object-safety-sized-2.rs
index 401602bd681a38b5a536e98fd533c8e8c2492c5f..3e1942d5a01884467d5ae54fed17430553dd0351 100644 (file)
@@ -18,16 +18,8 @@ trait Bar
 }
 
 fn make_bar<T:Bar>(t: &T) -> &Bar {
-    t
         //~^ ERROR E0038
-        //~| NOTE the trait cannot require that `Self : Sized`
-}
-
-fn make_bar_explicit<T:Bar>(t: &T) -> &Bar {
-    t as &Bar
-        //~^ ERROR E0038
-        //~| NOTE the trait cannot require that `Self : Sized`
-        //~| ERROR E0038
+    loop { }
 }
 
 fn main() {