]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/lint-non-uppercase-statics.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / lint / lint-non-uppercase-statics.rs
1 #![forbid(non_upper_case_globals)]
2 #![allow(dead_code)]
3
4 static foo: isize = 1; //~ ERROR static variable `foo` should have an upper case name
5
6 static mut bar: isize = 1; //~ ERROR static variable `bar` should have an upper case name
7
8 #[no_mangle]
9 pub static extern_foo: isize = 1; // OK, because #[no_mangle] supersedes the warning
10
11 fn main() { }