diff options
Diffstat (limited to 'tests/ui/did_you_mean/use_instead_of_import.rs')
-rw-r--r-- | tests/ui/did_you_mean/use_instead_of_import.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/did_you_mean/use_instead_of_import.rs b/tests/ui/did_you_mean/use_instead_of_import.rs new file mode 100644 index 000000000..2db7c2407 --- /dev/null +++ b/tests/ui/did_you_mean/use_instead_of_import.rs @@ -0,0 +1,23 @@ +// run-rustfix + +import std::{ + //~^ ERROR expected item, found `import` + io::Write, + rc::Rc, +}; + +require std::time::Duration; +//~^ ERROR expected item, found `require` + +include std::time::Instant; +//~^ ERROR expected item, found `include` + +pub using std::io; +//~^ ERROR expected item, found `using` + +fn main() { + let x = Rc::new(1); + let _ = write!(io::stdout(), "{:?}", x); + let _ = Duration::new(5, 0); + let _ = Instant::now(); +} |