]> git.lizzy.rs Git - rust.git/blob - tests/ui/underscore-imports/shadow.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / underscore-imports / shadow.rs
1 // Check that underscore imports don't cause glob imports to be unshadowed
2
3 mod a {
4     pub use std::ops::Deref as Shadow;
5 }
6
7 mod b {
8     pub use crate::a::*;
9     macro_rules! m {
10         ($i:ident) => { pub struct $i; }
11     }
12     m!(Shadow);
13 }
14
15 mod c {
16     use crate::b::Shadow as _; // Only imports the struct
17
18     fn f(x: &()) {
19         x.deref(); //~ ERROR no method named `deref` found
20     }
21 }
22
23 fn main() {}