rust/tests/ui/lint/use-redundant/use-redundant-issue-78894.rs

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

49 lines
537 B
Rust
Raw Normal View History

2024-03-03 22:28:59 -06:00
//@ check-pass
//@ edition:2018
2024-03-04 00:25:51 -06:00
2024-03-03 22:28:59 -06:00
#![warn(unused_imports)]
2024-03-04 00:25:51 -06:00
mod foo {
macro_rules! foo1 {
() => ();
}
pub(crate) use foo1;
}
2024-03-03 22:28:59 -06:00
fn main ()
{
bar!();
macro_rules! bar {
() => ();
}
use bar;
2024-03-04 00:25:51 -06:00
mod m {
bar1!();
macro_rules! bar1 {
() => ();
}
use bar1;
}
{
foo::foo1!();
}
{
use foo::foo1;
foo1!();
}
{
use foo::foo1; //~ WARNING unused import: `foo::foo1`
foo::foo1!();
}
2024-03-03 22:28:59 -06:00
}