1
1
error: constants have by default a `'static` lifetime
2
- --> tests/ui/redundant_static_lifetimes.rs:6 :17
2
+ --> tests/ui/redundant_static_lifetimes.rs:8 :17
3
3
|
4
4
LL | const VAR_ONE: &'static str = "Test constant #1"; // ERROR: Consider removing 'static.
5
5
| -^^^^^^^---- help: consider removing `'static`: `&str`
@@ -8,103 +8,103 @@ LL | const VAR_ONE: &'static str = "Test constant #1"; // ERROR: Consider removi
8
8
= help: to override `-D warnings` add `#[allow(clippy::redundant_static_lifetimes)]`
9
9
10
10
error: constants have by default a `'static` lifetime
11
- --> tests/ui/redundant_static_lifetimes.rs:10 :21
11
+ --> tests/ui/redundant_static_lifetimes.rs:12 :21
12
12
|
13
13
LL | const VAR_THREE: &[&'static str] = &["one", "two"]; // ERROR: Consider removing 'static
14
14
| -^^^^^^^---- help: consider removing `'static`: `&str`
15
15
16
16
error: constants have by default a `'static` lifetime
17
- --> tests/ui/redundant_static_lifetimes.rs:12 :32
17
+ --> tests/ui/redundant_static_lifetimes.rs:14 :32
18
18
|
19
19
LL | const VAR_FOUR: (&str, (&str, &'static str), &'static str) = ("on", ("th", "th"), "on"); // ERROR: Consider removing 'static
20
20
| -^^^^^^^---- help: consider removing `'static`: `&str`
21
21
22
22
error: constants have by default a `'static` lifetime
23
- --> tests/ui/redundant_static_lifetimes.rs:12 :47
23
+ --> tests/ui/redundant_static_lifetimes.rs:14 :47
24
24
|
25
25
LL | const VAR_FOUR: (&str, (&str, &'static str), &'static str) = ("on", ("th", "th"), "on"); // ERROR: Consider removing 'static
26
26
| -^^^^^^^---- help: consider removing `'static`: `&str`
27
27
28
28
error: constants have by default a `'static` lifetime
29
- --> tests/ui/redundant_static_lifetimes.rs:14 :17
29
+ --> tests/ui/redundant_static_lifetimes.rs:16 :17
30
30
|
31
31
LL | const VAR_SIX: &'static u8 = &5;
32
32
| -^^^^^^^--- help: consider removing `'static`: `&u8`
33
33
34
34
error: constants have by default a `'static` lifetime
35
- --> tests/ui/redundant_static_lifetimes.rs:16 :20
35
+ --> tests/ui/redundant_static_lifetimes.rs:18 :20
36
36
|
37
37
LL | const VAR_HEIGHT: &'static Foo = &Foo {};
38
38
| -^^^^^^^---- help: consider removing `'static`: `&Foo`
39
39
40
40
error: constants have by default a `'static` lifetime
41
- --> tests/ui/redundant_static_lifetimes.rs:18 :19
41
+ --> tests/ui/redundant_static_lifetimes.rs:20 :19
42
42
|
43
43
LL | const VAR_SLICE: &'static [u8] = b"Test constant #1"; // ERROR: Consider removing 'static.
44
44
| -^^^^^^^----- help: consider removing `'static`: `&[u8]`
45
45
46
46
error: constants have by default a `'static` lifetime
47
- --> tests/ui/redundant_static_lifetimes.rs:20 :19
47
+ --> tests/ui/redundant_static_lifetimes.rs:22 :19
48
48
|
49
49
LL | const VAR_TUPLE: &'static (u8, u8) = &(1, 2); // ERROR: Consider removing 'static.
50
50
| -^^^^^^^--------- help: consider removing `'static`: `&(u8, u8)`
51
51
52
52
error: constants have by default a `'static` lifetime
53
- --> tests/ui/redundant_static_lifetimes.rs:22 :19
53
+ --> tests/ui/redundant_static_lifetimes.rs:24 :19
54
54
|
55
55
LL | const VAR_ARRAY: &'static [u8; 1] = b"T"; // ERROR: Consider removing 'static.
56
56
| -^^^^^^^-------- help: consider removing `'static`: `&[u8; 1]`
57
57
58
58
error: statics have by default a `'static` lifetime
59
- --> tests/ui/redundant_static_lifetimes.rs:24 :25
59
+ --> tests/ui/redundant_static_lifetimes.rs:26 :25
60
60
|
61
61
LL | static STATIC_VAR_ONE: &'static str = "Test static #1"; // ERROR: Consider removing 'static.
62
62
| -^^^^^^^---- help: consider removing `'static`: `&str`
63
63
64
64
error: statics have by default a `'static` lifetime
65
- --> tests/ui/redundant_static_lifetimes.rs:28 :29
65
+ --> tests/ui/redundant_static_lifetimes.rs:30 :29
66
66
|
67
67
LL | static STATIC_VAR_THREE: &[&'static str] = &["one", "two"]; // ERROR: Consider removing 'static
68
68
| -^^^^^^^---- help: consider removing `'static`: `&str`
69
69
70
70
error: statics have by default a `'static` lifetime
71
- --> tests/ui/redundant_static_lifetimes.rs:30 :25
71
+ --> tests/ui/redundant_static_lifetimes.rs:32 :25
72
72
|
73
73
LL | static STATIC_VAR_SIX: &'static u8 = &5;
74
74
| -^^^^^^^--- help: consider removing `'static`: `&u8`
75
75
76
76
error: statics have by default a `'static` lifetime
77
- --> tests/ui/redundant_static_lifetimes.rs:32 :28
77
+ --> tests/ui/redundant_static_lifetimes.rs:34 :28
78
78
|
79
79
LL | static STATIC_VAR_HEIGHT: &'static Foo = &Foo {};
80
80
| -^^^^^^^---- help: consider removing `'static`: `&Foo`
81
81
82
82
error: statics have by default a `'static` lifetime
83
- --> tests/ui/redundant_static_lifetimes.rs:34 :27
83
+ --> tests/ui/redundant_static_lifetimes.rs:36 :27
84
84
|
85
85
LL | static STATIC_VAR_SLICE: &'static [u8] = b"Test static #3"; // ERROR: Consider removing 'static.
86
86
| -^^^^^^^----- help: consider removing `'static`: `&[u8]`
87
87
88
88
error: statics have by default a `'static` lifetime
89
- --> tests/ui/redundant_static_lifetimes.rs:36 :27
89
+ --> tests/ui/redundant_static_lifetimes.rs:38 :27
90
90
|
91
91
LL | static STATIC_VAR_TUPLE: &'static (u8, u8) = &(1, 2); // ERROR: Consider removing 'static.
92
92
| -^^^^^^^--------- help: consider removing `'static`: `&(u8, u8)`
93
93
94
94
error: statics have by default a `'static` lifetime
95
- --> tests/ui/redundant_static_lifetimes.rs:38 :27
95
+ --> tests/ui/redundant_static_lifetimes.rs:40 :27
96
96
|
97
97
LL | static STATIC_VAR_ARRAY: &'static [u8; 1] = b"T"; // ERROR: Consider removing 'static.
98
98
| -^^^^^^^-------- help: consider removing `'static`: `&[u8; 1]`
99
99
100
100
error: statics have by default a `'static` lifetime
101
- --> tests/ui/redundant_static_lifetimes.rs:40 :31
101
+ --> tests/ui/redundant_static_lifetimes.rs:42 :31
102
102
|
103
103
LL | static mut STATIC_MUT_SLICE: &'static mut [u32] = &mut [0];
104
104
| -^^^^^^^---------- help: consider removing `'static`: `&mut [u32]`
105
105
106
106
error: statics have by default a `'static` lifetime
107
- --> tests/ui/redundant_static_lifetimes.rs:69 :16
107
+ --> tests/ui/redundant_static_lifetimes.rs:71 :16
108
108
|
109
109
LL | static V: &'static u8 = &17;
110
110
| -^^^^^^^--- help: consider removing `'static`: `&u8`
0 commit comments