summaryrefslogtreecommitdiffstats
path: root/src/test/ui/resolve/issue-23716.rs
blob: e9139c0aa143f7b9808824bcb4d2de76a0b361dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
static foo: i32 = 0;

fn bar(foo: i32) {}
//~^ ERROR function parameters cannot shadow statics
//~| cannot be named the same as a static

mod submod {
    pub static answer: i32 = 42;
}

use self::submod::answer;

fn question(answer: i32) {}
//~^ ERROR function parameters cannot shadow statics
//~| cannot be named the same as a static
fn main() {
}