rust/tests/ui/resolve/unused-qualifications-suggestion.rs
2024-03-14 09:54:42 +08:00

26 lines
345 B
Rust

//@ run-rustfix
#![deny(unused_qualifications)]
mod foo {
pub fn bar() {}
}
mod baz {
pub mod qux {
pub fn quux() {}
}
}
fn main() {
use foo::bar;
foo::bar();
//~^ ERROR unnecessary qualification
bar();
use baz::qux::quux;
baz::qux::quux();
//~^ ERROR unnecessary qualification
quux();
}