2021-12-09 17:10:05 +00:00
|
|
|
error[E0015]: cannot call non-const fn `random` in constant functions
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:14:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | random()
|
2018-08-08 12:28:26 +00:00
|
|
|
| ^^^^^^^^
|
2021-12-09 17:10:05 +00:00
|
|
|
|
|
|
|
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2020-01-10 13:31:36 +00:00
|
|
|
error[E0013]: constant functions cannot refer to statics
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:20:5
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | Y
|
|
|
|
| ^
|
2020-01-10 13:31:36 +00:00
|
|
|
|
|
|
|
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2020-01-10 13:31:36 +00:00
|
|
|
error[E0013]: constant functions cannot refer to statics
|
2019-11-11 11:15:38 +00:00
|
|
|
--> $DIR/const-fn-not-safe-for-const.rs:25:6
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | &Y
|
2019-11-11 11:15:38 +00:00
|
|
|
| ^
|
2020-01-10 13:31:36 +00:00
|
|
|
|
|
|
|
|
= help: consider extracting the value of the `static` to a `const`, and referring to that
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2018-12-28 19:05:22 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-04-17 17:26:38 +00:00
|
|
|
Some errors have detailed explanations: E0013, E0015.
|
2018-08-08 12:28:26 +00:00
|
|
|
For more information about an error, try `rustc --explain E0013`.
|