We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbe8907 commit 4c5c397Copy full SHA for 4c5c397
src/lib.rs
@@ -156,6 +156,7 @@ macro_rules! __lazy_static_internal {
156
$(#[$attr])*
157
$($vis)* struct $N {__private_field: ()}
158
#[doc(hidden)]
159
+ #[allow(non_upper_case_globals)]
160
$($vis)* static $N: $N = $N {__private_field: ()};
161
};
162
() => ()
tests/test.rs
@@ -1,3 +1,5 @@
1
+#![deny(warnings)]
2
+
3
#[macro_use]
4
extern crate lazy_static;
5
use std::collections::HashMap;
@@ -35,6 +37,11 @@ lazy_static! {
35
37
static ref S3: String = [*S1, *S2].join("");
36
38
}
39
40
+lazy_static! {
41
42
+ pub static ref string: String = "hello".to_string();
43
+}
44
45
#[test]
46
fn s3() {
47
assert_eq!(&*S3, "ab");
0 commit comments