rust-lang-nursery / lazy-static.rs

A small macro for defining lazy evaluated static variables in Rust.
Apache License 2.0
1.92k stars 111 forks source link

Apply non-upper-case-globals to generated statics #197

Closed KodrAus closed 2 years ago

KodrAus commented 2 years ago

Closes #153

This is a bit of a bandaid fix that just unconditionally applies #[allow(non_upper_case_globals)] on the generated global in the same way we do for non-camel-case type names. With some refactoring to expand to a const _: () {} block we could probably make the way attributes are applied to the expanded code consistent but since we're in life-support mode I've just opted for the simplest approach.