Files
rust/tests/ui/resolve/unused-macro-import.rs
Vadim Petrochenkov f89660e4aa resolve: Do not finalize shadowed bindings
I.e. do not mark them as used, or non-speculative loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
2025-09-25 20:36:14 +03:00

14 lines
257 B
Rust

//@ check-pass
#![warn(unused_imports)]
#[macro_export]
macro_rules! mac { () => {} }
fn main() {
// Unused, `mac` as `macro_rules!` is already in scope and has higher priority.
use crate::mac; //~ WARN unused import: `crate::mac`
mac!();
}