]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/object-safety-generics.rs
New upstream version 1.12.0+dfsg1
[rustc.git] / src / test / compile-fail / object-safety-generics.rs
index 5097e3d7b10d4735cdc961e4b86d418b7a34fba0..6174d45b898d6971e00405c141930ba98590622c 100644 (file)
@@ -24,12 +24,14 @@ trait Quux {
 fn make_bar<T:Bar>(t: &T) -> &Bar {
         //~^ ERROR E0038
         //~| NOTE method `bar` has generic type parameters
+        //~| NOTE the trait `Bar` cannot be made into an object
     t
 }
 
 fn make_bar_explicit<T:Bar>(t: &T) -> &Bar {
     //~^ ERROR E0038
-    //~^^ NOTE method `bar` has generic type parameters
+    //~| NOTE method `bar` has generic type parameters
+    //~| NOTE the trait `Bar` cannot be made into an object
     t as &Bar
 }