]> git.lizzy.rs Git - rust.git/blob - tests/ui/resolve/issue-23716.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / resolve / issue-23716.rs
1 static foo: i32 = 0;
2
3 fn bar(foo: i32) {}
4 //~^ ERROR function parameters cannot shadow statics
5 //~| cannot be named the same as a static
6
7 mod submod {
8     pub static answer: i32 = 42;
9 }
10
11 use self::submod::answer;
12
13 fn question(answer: i32) {}
14 //~^ ERROR function parameters cannot shadow statics
15 //~| cannot be named the same as a static
16 fn main() {
17 }