]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/no-implicit-prelude-nested.rs
auto merge of #15421 : catharsis/rust/doc-ffi-minor-fixes, r=alexcrichton
[rust.git] / src / test / compile-fail / no-implicit-prelude-nested.rs
index e215407ec87d1efbcbb4ee452ae5c860e8ee9ebf..2fb097f111db47f98727566112fc8e35047c49f0 100644 (file)
@@ -21,12 +21,11 @@ mod baz {
         impl Add for Test {} //~ ERROR: attempt to implement a nonexistent trait
         impl Clone for Test {} //~ ERROR: attempt to implement a nonexistent trait
         impl Iterator for Test {} //~ ERROR: attempt to implement a nonexistent trait
-        impl ToStr for Test {} //~ ERROR: attempt to implement a nonexistent trait
+        impl ToString for Test {} //~ ERROR: attempt to implement a nonexistent trait
         impl Writer for Test {} //~ ERROR: attempt to implement a nonexistent trait
 
         fn foo() {
-            print("foo"); //~ ERROR: unresolved name
-            println("bar"); //~ ERROR: unresolved name
+            drop(2) //~ ERROR: unresolved name
         }
     }
 
@@ -34,12 +33,11 @@ fn foo() {
     impl Add for Test {} //~ ERROR: attempt to implement a nonexistent trait
     impl Clone for Test {} //~ ERROR: attempt to implement a nonexistent trait
     impl Iterator for Test {} //~ ERROR: attempt to implement a nonexistent trait
-    impl ToStr for Test {} //~ ERROR: attempt to implement a nonexistent trait
+    impl ToString for Test {} //~ ERROR: attempt to implement a nonexistent trait
     impl Writer for Test {} //~ ERROR: attempt to implement a nonexistent trait
 
     fn foo() {
-        print("foo"); //~ ERROR: unresolved name
-        println("bar"); //~ ERROR: unresolved name
+        drop(2) //~ ERROR: unresolved name
     }
 }
 
@@ -50,12 +48,11 @@ mod qux_inner {
         impl Add for Test {} //~ ERROR: attempt to implement a nonexistent trait
         impl Clone for Test {} //~ ERROR: attempt to implement a nonexistent trait
         impl Iterator for Test {} //~ ERROR: attempt to implement a nonexistent trait
-        impl ToStr for Test {} //~ ERROR: attempt to implement a nonexistent trait
+        impl ToString for Test {} //~ ERROR: attempt to implement a nonexistent trait
         impl Writer for Test {} //~ ERROR: attempt to implement a nonexistent trait
 
         fn foo() {
-            print("foo"); //~ ERROR: unresolved name
-            println("bar"); //~ ERROR: unresolved name
+            drop(2) //~ ERROR: unresolved name
         }
     }
 }
@@ -63,6 +60,5 @@ fn foo() {
 
 fn main() {
     // these should work fine
-    print("foo");
-    println("bar");
+    drop(2)
 }