2014-03-22 01:05:05 +00:00
|
|
|
#![no_implicit_prelude]
|
2013-07-17 04:23:17 +00:00
|
|
|
|
|
|
|
// Test that things from the prelude aren't in scope. Use many of them
|
|
|
|
// so that renaming some things won't magically make this test fail
|
2018-11-27 02:59:49 +00:00
|
|
|
// for the wrong reason (e.g., if `Add` changes to `Addition`, and
|
2013-07-17 04:23:17 +00:00
|
|
|
// `no_implicit_prelude` stops working, then the `impl Add` will still
|
|
|
|
// fail with the same error message).
|
|
|
|
|
|
|
|
struct Test;
|
2017-01-11 22:18:08 +00:00
|
|
|
impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope
|
2019-07-15 00:28:17 +00:00
|
|
|
impl Clone for Test {} //~ ERROR expected trait, found derive macro `Clone`
|
2017-01-11 22:18:08 +00:00
|
|
|
impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope
|
|
|
|
impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope
|
|
|
|
impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope
|
2013-07-17 04:23:17 +00:00
|
|
|
|
|
|
|
fn main() {
|
2017-01-11 22:18:08 +00:00
|
|
|
drop(2) //~ ERROR cannot find function `drop` in this scope
|
2013-07-17 04:23:17 +00:00
|
|
|
}
|