about summary refs log tree commit diff
path: root/tests/ui/shadowed/use-shadows-reexport.rs
blob: d220e4b406be8f4d313cb9947f0bb0003409dfc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Check that a local `use` declaration can shadow a re-exported item within the same module.

//@ run-pass

#![allow(unused_imports)]
mod foo {
    pub fn f() {}

    pub use self::f as bar;
    use crate::foo as bar;
}

fn main() {
    foo::bar();
}