rust/tests/ui/lint/lint-qualification.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
390 B
Rust
Raw Normal View History

2014-10-27 22:37:07 +00:00
#![deny(unused_qualifications)]
2019-08-11 16:55:14 +00:00
#![allow(deprecated)]
mod foo {
pub fn bar() {}
}
fn main() {
use foo::bar;
foo::bar(); //~ ERROR: unnecessary qualification
bar();
2016-10-22 22:08:08 +00:00
let _ = || -> Result<(), ()> { try!(Ok(())); Ok(()) }; // issue #37345
2016-10-22 22:08:08 +00:00
macro_rules! m { () => {
$crate::foo::bar(); // issue #37357
::foo::bar(); // issue #38682
} }
m!();
}