]> git.lizzy.rs Git - rust.git/blob - tests/ui/const_static_lifetime.stderr
Final .stderr for `const_static_lifetime`.
[rust.git] / tests / ui / const_static_lifetime.stderr
1 error: Constants have by default a `'static` lifetime
2  --> $DIR/const_static_lifetime.rs:4:17
3   |
4 4 | const VAR_ONE: &'static str = "Test constant #1"; // ERROR Consider removing 'static.
5   |                 ^^^^^^^ help: consider removing `'static`
6   |
7   = note: `-D const-static-lifetime` implied by `-D warnings`
8
9 error: Constants have by default a `'static` lifetime
10  --> $DIR/const_static_lifetime.rs:8:21
11   |
12 8 | const VAR_THREE: &[&'static str] = &["one", "two"]; // ERROR Consider removing 'static
13   |                     ^^^^^^^ help: consider removing `'static`
14
15 error: Constants have by default a `'static` lifetime
16   --> $DIR/const_static_lifetime.rs:10:32
17    |
18 10 | const VAR_FOUR: (&str, (&str, &'static str), &'static str) = ("on", ("th", "th"), "on"); // ERROR Consider removing 'static
19    |                                ^^^^^^^ help: consider removing `'static`
20
21 error: Constants have by default a `'static` lifetime
22   --> $DIR/const_static_lifetime.rs:10:47
23    |
24 10 | const VAR_FOUR: (&str, (&str, &'static str), &'static str) = ("on", ("th", "th"), "on"); // ERROR Consider removing 'static
25    |                                               ^^^^^^^ help: consider removing `'static`
26
27 error: Constants have by default a `'static` lifetime
28   --> $DIR/const_static_lifetime.rs:12:30
29    |
30 12 | const VAR_FIVE: &'static [&[&'static str]] = &[&["test"], &["other one"]]; // ERROR Consider removing 'static
31    |                              ^^^^^^^ help: consider removing `'static`
32
33 error: Constants have by default a `'static` lifetime
34   --> $DIR/const_static_lifetime.rs:14:17
35    |
36 14 | const VAR_SIX: &'static u8 = &5;
37    |                 ^^^^^^^ help: consider removing `'static`
38
39 error: Constants have by default a `'static` lifetime
40   --> $DIR/const_static_lifetime.rs:16:39
41    |
42 16 | const VAR_SEVEN: &[&(&str, &'static [&'static str])] = &[&("one", &["other one"])];
43    |                                       ^^^^^^^ help: consider removing `'static`
44
45 error: Constants have by default a `'static` lifetime
46   --> $DIR/const_static_lifetime.rs:18:20
47    |
48 18 | const VAR_HEIGHT: &'static Foo = &Foo {};
49    |                    ^^^^^^^ help: consider removing `'static`
50