rust/src/test/ui/lint/lint-qualification.rs
2018-12-25 21:08:33 -07:00

20 lines
368 B
Rust

#![deny(unused_qualifications)]
mod foo {
pub fn bar() {}
}
fn main() {
use foo::bar;
foo::bar(); //~ ERROR: unnecessary qualification
bar();
let _ = || -> Result<(), ()> { try!(Ok(())); Ok(()) }; // issue #37345
macro_rules! m { () => {
$crate::foo::bar(); // issue #37357
::foo::bar(); // issue #38682
} }
m!();
}