]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | #![no_implicit_prelude] |
2 | ||
3 | // Test that things from the prelude aren't in scope. Use many of them | |
4 | // so that renaming some things won't magically make this test fail | |
0731742a | 5 | // for the wrong reason (e.g., if `Add` changes to `Addition`, and |
1a4d82fc JJ |
6 | // `no_implicit_prelude` stops working, then the `impl Add` will still |
7 | // fail with the same error message). | |
8 | ||
9 | struct Test; | |
32a655c1 | 10 | impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope |
416331ca | 11 | impl Clone for Test {} //~ ERROR expected trait, found derive macro `Clone` |
32a655c1 SL |
12 | impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope |
13 | impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope | |
14 | impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope | |
1a4d82fc JJ |
15 | |
16 | fn main() { | |
32a655c1 | 17 | drop(2) //~ ERROR cannot find function `drop` in this scope |
1a4d82fc | 18 | } |