]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/object-safety-sized.rs
Make RFC 1214 warnings into errors, and rip out the "warn or err"
[rust.git] / src / test / compile-fail / object-safety-sized.rs
index 29b4e4db65c36d11a70a7b04bbceb1e1dc988c11..501d61d20fed124453edb3b2bad2050c71f7d273 100644 (file)
@@ -16,16 +16,9 @@ trait Bar : Sized {
 }
 
 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
+    t
 }
 
 fn main() {