blob: 9e680e87f79a89aa81b69556dcd94fb5610b67b0 [file] [log] [blame]
error[E0658]: let bindings in constants are unstable (see issue #48821)
--> $DIR/issue-18118.rs:15:17
|
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)
--> $DIR/issue-18118.rs:15:17
|
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)
--> $DIR/issue-18118.rs:18:9
|
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)
--> $DIR/issue-18118.rs:12:5
|
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)
--> $DIR/issue-18118.rs:12:5
|
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
--> $DIR/issue-18118.rs:18:9
|
LL | &p //~ ERROR `p` does not live long enough
| ^^
| |
| borrowed value does not live long enough
| using this value as a constant requires that `p` is borrowed for `'static`
LL | //~^ ERROR let bindings in constants are unstable
LL | };
| - `p` dropped here while still borrowed
error: aborting due to 6 previous errors
Some errors occurred: E0597, E0658.
For more information about an error, try `rustc --explain E0597`.