rust/src/test/ui/issues/issue-18118.stderr

68 lines
2.2 KiB
Plaintext
Raw Normal View History

2018-07-15 16:11:54 -05:00
error[E0658]: let bindings in constants are unstable (see issue #48821)
2018-12-25 09:56:47 -06:00
--> $DIR/issue-18118.rs:5:17
2018-07-15 16:11:54 -05:00
|
LL | let p = 3;
| ^
|
= help: add #![feature(const_let)] to the crate attributes to enable
error[E0658]: statements in constants are unstable (see issue #48821)
2018-12-25 09:56:47 -06:00
--> $DIR/issue-18118.rs:5:17
2018-07-15 16:11:54 -05:00
|
LL | let p = 3;
| ^
|
= help: add #![feature(const_let)] to the crate attributes to enable
error[E0658]: let bindings in constants are unstable (see issue #48821)
2018-12-25 09:56:47 -06:00
--> $DIR/issue-18118.rs:8:9
2018-07-15 16:11:54 -05:00
|
LL | &p //~ ERROR `p` does not live long enough
| ^^
|
= help: add #![feature(const_let)] to the crate attributes to enable
error[E0658]: let bindings in constants are unstable (see issue #48821)
2018-12-25 09:56:47 -06:00
--> $DIR/issue-18118.rs:2:5
2018-07-15 16:11:54 -05:00
|
LL | / const z: &'static isize = {
LL | | //~^ ERROR let bindings in constants are unstable
LL | | //~| ERROR statements in constants are unstable
LL | | let p = 3;
... |
LL | | //~^ ERROR let bindings in constants are unstable
LL | | };
| |______^
|
= help: add #![feature(const_let)] to the crate attributes to enable
error[E0658]: statements in constants are unstable (see issue #48821)
2018-12-25 09:56:47 -06:00
--> $DIR/issue-18118.rs:2:5
2018-07-15 16:11:54 -05:00
|
LL | / const z: &'static isize = {
LL | | //~^ ERROR let bindings in constants are unstable
LL | | //~| ERROR statements in constants are unstable
LL | | let p = 3;
... |
LL | | //~^ ERROR let bindings in constants are unstable
LL | | };
| |______^
|
= help: add #![feature(const_let)] to the crate attributes to enable
error[E0597]: `p` does not live long enough
2018-12-25 09:56:47 -06:00
--> $DIR/issue-18118.rs:8:10
2018-07-15 16:11:54 -05:00
|
LL | &p //~ ERROR `p` does not live long enough
| ^ borrowed value does not live long enough
LL | //~^ ERROR let bindings in constants are unstable
LL | };
| - borrowed value only lives until here
|
= note: borrowed value must be valid for the static lifetime...
error: aborting due to 6 previous errors
Some errors occurred: E0597, E0658.
For more information about an error, try `rustc --explain E0597`.