8 const VAR_ONE: &str = "Test constant #1"; // ERROR Consider removing 'static.
10 const VAR_TWO: &str = "Test constant #2"; // This line should not raise a warning.
12 const VAR_THREE: &[&str] = &["one", "two"]; // ERROR Consider removing 'static
14 const VAR_FOUR: (&str, (&str, &str), &str) = ("on", ("th", "th"), "on"); // ERROR Consider removing 'static
16 const VAR_SIX: &u8 = &5;
18 const VAR_HEIGHT: &Foo = &Foo {};
20 const VAR_SLICE: &[u8] = b"Test constant #1"; // ERROR Consider removing 'static.
22 const VAR_TUPLE: &(u8, u8) = &(1, 2); // ERROR Consider removing 'static.
24 const VAR_ARRAY: &[u8; 1] = b"T"; // ERROR Consider removing 'static.
26 static STATIC_VAR_ONE: &str = "Test static #1"; // ERROR Consider removing 'static.
28 static STATIC_VAR_TWO: &str = "Test static #2"; // This line should not raise a warning.
30 static STATIC_VAR_THREE: &[&str] = &["one", "two"]; // ERROR Consider removing 'static
32 static STATIC_VAR_SIX: &u8 = &5;
34 static STATIC_VAR_HEIGHT: &Foo = &Foo {};
36 static STATIC_VAR_SLICE: &[u8] = b"Test static #3"; // ERROR Consider removing 'static.
38 static STATIC_VAR_TUPLE: &(u8, u8) = &(1, 2); // ERROR Consider removing 'static.
40 static STATIC_VAR_ARRAY: &[u8; 1] = b"T"; // ERROR Consider removing 'static.
43 let false_positive: &'static str = "test";
47 const TRAIT_VAR: &'static str;
51 const IMPL_VAR: &'static str = "var";
55 const TRAIT_VAR: &'static str = "foo";