2018-08-08 07:28:26 -05:00
|
|
|
error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:14:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | random() //~ ERROR E0015
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error[E0013]: constant functions cannot refer to statics, use a constant instead
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:20:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Y
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error[E0013]: constant functions cannot refer to statics, use a constant instead
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:25:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | &Y
|
|
|
|
| ^^
|
|
|
|
|
2018-11-26 06:08:55 -06:00
|
|
|
error[E0658]: let bindings in constant functions are unstable (see issue #48821)
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:30:13
|
2018-11-26 06:08:55 -06:00
|
|
|
|
|
|
|
|
LL | let x = 22; //~ ERROR let bindings in constant functions are unstable
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= help: add #![feature(const_let)] to the crate attributes to enable
|
|
|
|
|
|
|
|
error[E0658]: statements in constant functions are unstable (see issue #48821)
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:30:13
|
2018-11-26 06:08:55 -06:00
|
|
|
|
|
|
|
|
LL | let x = 22; //~ ERROR let bindings in constant functions are unstable
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= help: add #![feature(const_let)] to the crate attributes to enable
|
|
|
|
|
|
|
|
error[E0658]: let bindings in constant functions are unstable (see issue #48821)
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:32:13
|
2018-11-26 06:08:55 -06:00
|
|
|
|
|
|
|
|
LL | let y = 44; //~ ERROR let bindings in constant functions are unstable
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= help: add #![feature(const_let)] to the crate attributes to enable
|
|
|
|
|
|
|
|
error[E0658]: statements in constant functions are unstable (see issue #48821)
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:32:13
|
2018-11-26 06:08:55 -06:00
|
|
|
|
|
|
|
|
LL | let y = 44; //~ ERROR let bindings in constant functions are unstable
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= help: add #![feature(const_let)] to the crate attributes to enable
|
|
|
|
|
|
|
|
error[E0658]: let bindings in constant functions are unstable (see issue #48821)
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:34:5
|
2018-11-26 06:08:55 -06:00
|
|
|
|
|
|
|
|
LL | x + y
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: add #![feature(const_let)] to the crate attributes to enable
|
|
|
|
|
|
|
|
error[E0658]: let bindings in constant functions are unstable (see issue #48821)
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:34:9
|
2018-11-26 06:08:55 -06:00
|
|
|
|
|
|
|
|
LL | x + y
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= help: add #![feature(const_let)] to the crate attributes to enable
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2018-11-26 06:08:55 -06:00
|
|
|
Some errors occurred: E0013, E0015, E0658.
|
2018-08-08 07:28:26 -05:00
|
|
|
For more information about an error, try `rustc --explain E0013`.
|