summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-15774.rs
blob: ed2235758b9d9e8761db36420805432cf3214869 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// run-pass
// pretty-expanded FIXME #23616

#![deny(warnings)]
#![allow(unused_imports)]

pub enum Foo { A }
mod bar {
    pub fn normal(x: ::Foo) {
        use Foo::A;
        match x {
            A => {}
        }
    }
    pub fn wrong(x: ::Foo) {
        match x {
            ::Foo::A => {}
        }
    }
}

pub fn main() {
    bar::normal(Foo::A);
    bar::wrong(Foo::A);
}