]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-18118.nll.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-18118.nll.stderr
1 error[E0658]: let bindings in constants are unstable (see issue #48821)
2   --> $DIR/issue-18118.rs:15:17
3    |
4 LL |         let p = 3;
5    |                 ^
6    |
7    = help: add #![feature(const_let)] to the crate attributes to enable
8
9 error[E0658]: statements in constants are unstable (see issue #48821)
10   --> $DIR/issue-18118.rs:15:17
11    |
12 LL |         let p = 3;
13    |                 ^
14    |
15    = help: add #![feature(const_let)] to the crate attributes to enable
16
17 error[E0658]: let bindings in constants are unstable (see issue #48821)
18   --> $DIR/issue-18118.rs:18:9
19    |
20 LL |         &p //~ ERROR `p` does not live long enough
21    |         ^^
22    |
23    = help: add #![feature(const_let)] to the crate attributes to enable
24
25 error[E0658]: let bindings in constants are unstable (see issue #48821)
26   --> $DIR/issue-18118.rs:12:5
27    |
28 LL | /     const z: &'static isize = {
29 LL | |         //~^ ERROR let bindings in constants are unstable
30 LL | |         //~| ERROR statements in constants are unstable
31 LL | |         let p = 3;
32 ...  |
33 LL | |         //~^ ERROR let bindings in constants are unstable
34 LL | |     };
35    | |______^
36    |
37    = help: add #![feature(const_let)] to the crate attributes to enable
38
39 error[E0658]: statements in constants are unstable (see issue #48821)
40   --> $DIR/issue-18118.rs:12:5
41    |
42 LL | /     const z: &'static isize = {
43 LL | |         //~^ ERROR let bindings in constants are unstable
44 LL | |         //~| ERROR statements in constants are unstable
45 LL | |         let p = 3;
46 ...  |
47 LL | |         //~^ ERROR let bindings in constants are unstable
48 LL | |     };
49    | |______^
50    |
51    = help: add #![feature(const_let)] to the crate attributes to enable
52
53 error[E0597]: `p` does not live long enough
54   --> $DIR/issue-18118.rs:18:9
55    |
56 LL |         &p //~ ERROR `p` does not live long enough
57    |         ^^ borrowed value does not live long enough
58 LL |         //~^ ERROR let bindings in constants are unstable
59 LL |     };
60    |     - `p` dropped here while still borrowed
61    |
62    = note: borrowed value must be valid for the static lifetime...
63
64 error: aborting due to 6 previous errors
65
66 Some errors occurred: E0597, E0658.
67 For more information about an error, try `rustc --explain E0597`.