1 // Test that things from the prelude aren't in scope. Use many of them
2 // so that renaming some things won't magically make this test fail
3 // for the wrong reason (e.g., if `Add` changes to `Addition`, and
4 // `no_implicit_prelude` stops working, then the `impl Add` will still
5 // fail with the same error message).
11 impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope
12 impl Clone for Test {} //~ ERROR expected trait, found derive macro `Clone`
13 impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope
14 impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope
15 impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope
18 drop(2) //~ ERROR cannot find function `drop` in this scope
23 impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope
24 impl Clone for Test {} //~ ERROR expected trait, found derive macro `Clone`
25 impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope
26 impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope
27 impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope
30 drop(2) //~ ERROR cannot find function `drop` in this scope
35 #[no_implicit_prelude]
38 impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope
39 impl Clone for Test {} //~ ERROR expected trait, found derive macro `Clone`
40 impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope
41 impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope
42 impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope
45 drop(2) //~ ERROR cannot find function `drop` in this scope
52 // these should work fine