summaryrefslogtreecommitdiffstats
path: root/src/test/ui/global-scope.rs
blob: 944eee5afc307e7ee99ebbc901b3b7a40639bdf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass

pub fn f() -> isize { return 1; }

pub mod foo {
    pub fn f() -> isize { return 2; }
    pub fn g() {
        assert_eq!(f(), 2);
        assert_eq!(::f(), 1);
    }
}

pub fn main() { return foo::g(); }