]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-fn-not-safe-for-const.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / consts / const-fn-not-safe-for-const.stderr
1 error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants
2   --> $DIR/const-fn-not-safe-for-const.rs:20:14
3    |
4 LL |     unsafe { transmute(x) } //~ ERROR E0015
5    |              ^^^^^^^^^^^^
6
7 error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants
8   --> $DIR/const-fn-not-safe-for-const.rs:24:5
9    |
10 LL |     random() //~ ERROR E0015
11    |     ^^^^^^^^
12
13 error[E0013]: constant functions cannot refer to statics, use a constant instead
14   --> $DIR/const-fn-not-safe-for-const.rs:30:5
15    |
16 LL |     Y
17    |     ^
18
19 error[E0013]: constant functions cannot refer to statics, use a constant instead
20   --> $DIR/const-fn-not-safe-for-const.rs:35:5
21    |
22 LL |     &Y
23    |     ^^
24
25 error[E0658]: let bindings in constant functions are unstable (see issue #48821)
26   --> $DIR/const-fn-not-safe-for-const.rs:40:13
27    |
28 LL |     let x = 22;
29    |             ^^
30    |
31    = help: add #![feature(const_let)] to the crate attributes to enable
32
33 error[E0658]: statements in constant functions are unstable (see issue #48821)
34   --> $DIR/const-fn-not-safe-for-const.rs:40:13
35    |
36 LL |     let x = 22;
37    |             ^^
38    |
39    = help: add #![feature(const_let)] to the crate attributes to enable
40
41 error[E0658]: let bindings in constant functions are unstable (see issue #48821)
42   --> $DIR/const-fn-not-safe-for-const.rs:43:13
43    |
44 LL |     let y = 44;
45    |             ^^
46    |
47    = help: add #![feature(const_let)] to the crate attributes to enable
48
49 error[E0658]: statements in constant functions are unstable (see issue #48821)
50   --> $DIR/const-fn-not-safe-for-const.rs:43:13
51    |
52 LL |     let y = 44;
53    |             ^^
54    |
55    = help: add #![feature(const_let)] to the crate attributes to enable
56
57 error[E0658]: let bindings in constant functions are unstable (see issue #48821)
58   --> $DIR/const-fn-not-safe-for-const.rs:46:5
59    |
60 LL |     x + y
61    |     ^
62    |
63    = help: add #![feature(const_let)] to the crate attributes to enable
64
65 error[E0658]: let bindings in constant functions are unstable (see issue #48821)
66   --> $DIR/const-fn-not-safe-for-const.rs:46:9
67    |
68 LL |     x + y
69    |         ^
70    |
71    = help: add #![feature(const_let)] to the crate attributes to enable
72
73 error: aborting due to 10 previous errors
74
75 Some errors occurred: E0013, E0015, E0658.
76 For more information about an error, try `rustc --explain E0013`.