summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/lint-non-uppercase-statics.rs
blob: 5bd1430328b48e6c35e1640f8c5f22a87bddb564 (plain)
1
2
3
4
5
6
7
8
9
10
11
#![forbid(non_upper_case_globals)]
#![allow(dead_code)]

static foo: isize = 1; //~ ERROR static variable `foo` should have an upper case name

static mut bar: isize = 1; //~ ERROR static variable `bar` should have an upper case name

#[no_mangle]
pub static extern_foo: isize = 1; // OK, because #[no_mangle] supersedes the warning

fn main() { }