]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/typeck_type_placeholder_item.rs
New upstream version 1.12.0+dfsg1
[rustc.git] / src / test / compile-fail / typeck_type_placeholder_item.rs
index d4f3cdfd8b7e248eefedc4d3896d13a0101ff235..42db3b47a04f3af15e6c3faf07ed8e2107a9b528 100644 (file)
 
 fn test() -> _ { 5 }
 //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+//~| NOTE not allowed in type signatures
 
 fn test2() -> (_, _) { (5, 5) }
 //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
 //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
+//~| NOTE not allowed in type signatures
+//~| NOTE not allowed in type signatures
 
 static TEST3: _ = "test";
 //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+//~| NOTE not allowed in type signatures
 
 static TEST4: _ = 145;
 //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+//~| NOTE not allowed in type signatures
 
 static TEST5: (_, _) = (1, 2);
 //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
 //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
+//~| NOTE not allowed in type signatures
+//~| NOTE not allowed in type signatures
 
 fn test6(_: _) { }
 //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+//~| NOTE not allowed in type signatures
 
 fn test7(x: _) { let _x: usize = x; }
 //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+//~| NOTE not allowed in type signatures
 
 fn test8(_f: fn() -> _) { }
 //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+//~| NOTE not allowed in type signatures
 
 struct Test9;
 
 impl Test9 {
     fn test9(&self) -> _ { () }
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 
     fn test10(&self, _x : _) { }
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 }
 
 impl Clone for Test9 {
     fn clone(&self) -> _ { Test9 }
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 
     fn clone_from(&mut self, other: _) { *self = Test9; }
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 }
 
 struct Test10 {
     a: _,
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
     b: (_, _),
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
     //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
+    //~| NOTE not allowed in type signatures
 }
 
 pub fn main() {
     fn fn_test() -> _ { 5 }
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 
     fn fn_test2() -> (_, _) { (5, 5) }
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
     //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
+    //~| NOTE not allowed in type signatures
 
     static FN_TEST3: _ = "test";
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 
     static FN_TEST4: _ = 145;
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 
     static FN_TEST5: (_, _) = (1, 2);
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
     //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
+    //~| NOTE not allowed in type signatures
 
     fn fn_test6(_: _) { }
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 
     fn fn_test7(x: _) { let _x: usize = x; }
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 
     fn fn_test8(_f: fn() -> _) { }
     //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+    //~| NOTE not allowed in type signatures
 
     struct FnTest9;
 
     impl FnTest9 {
         fn fn_test9(&self) -> _ { () }
         //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+        //~| NOTE not allowed in type signatures
 
         fn fn_test10(&self, _x : _) { }
         //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+        //~| NOTE not allowed in type signatures
     }
 
     impl Clone for FnTest9 {
         fn clone(&self) -> _ { FnTest9 }
         //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+        //~| NOTE not allowed in type signatures
 
         fn clone_from(&mut self, other: _) { *self = FnTest9; }
         //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+        //~| NOTE not allowed in type signatures
     }
 
     struct FnTest10 {
         a: _,
         //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
+        //~| NOTE not allowed in type signatures
         b: (_, _),
         //~^ ERROR the type placeholder `_` is not allowed within types on item signatures
         //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures
+        //~| NOTE not allowed in type signatures
+        //~| NOTE not allowed in type signatures
     }
 
 }