mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
18 lines
351 B
Rust
18 lines
351 B
Rust
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() {
|
|
}
|