|
1 |
| -error: unsizing casts are not allowed in const fn |
| 1 | +error[E0723]: unsizing casts are not allowed in const fn (see issue #57563) |
2 | 2 | --> $DIR/cast_errors.rs:3:41
|
3 | 3 | |
|
4 | 4 | LL | const fn unsize(x: &[u8; 3]) -> &[u8] { x }
|
5 | 5 | | ^
|
| 6 | + | |
| 7 | + = help: add #![feature(const_fn)] to the crate attributes to enable |
6 | 8 |
|
7 |
| -error: function pointers in const fn are unstable |
| 9 | +error[E0723]: function pointers in const fn are unstable (see issue #57563) |
8 | 10 | --> $DIR/cast_errors.rs:5:23
|
9 | 11 | |
|
10 | 12 | LL | const fn closure() -> fn() { || {} }
|
11 | 13 | | ^^^^
|
| 14 | + | |
| 15 | + = help: add #![feature(const_fn)] to the crate attributes to enable |
12 | 16 |
|
13 |
| -error: function pointers in const fn are unstable |
| 17 | +error[E0723]: function pointers in const fn are unstable (see issue #57563) |
14 | 18 | --> $DIR/cast_errors.rs:8:5
|
15 | 19 | |
|
16 | 20 | LL | (|| {}) as fn();
|
17 | 21 | | ^^^^^^^^^^^^^^^
|
| 22 | + | |
| 23 | + = help: add #![feature(const_fn)] to the crate attributes to enable |
18 | 24 |
|
19 |
| -error: function pointers in const fn are unstable |
| 25 | +error[E0723]: function pointers in const fn are unstable (see issue #57563) |
20 | 26 | --> $DIR/cast_errors.rs:11:28
|
21 | 27 | |
|
22 | 28 | LL | const fn reify(f: fn()) -> unsafe fn() { f }
|
23 | 29 | | ^^^^^^^^^^^
|
| 30 | + | |
| 31 | + = help: add #![feature(const_fn)] to the crate attributes to enable |
24 | 32 |
|
25 |
| -error: function pointers in const fn are unstable |
| 33 | +error[E0723]: function pointers in const fn are unstable (see issue #57563) |
26 | 34 | --> $DIR/cast_errors.rs:13:21
|
27 | 35 | |
|
28 | 36 | LL | const fn reify2() { main as unsafe fn(); }
|
29 | 37 | | ^^^^^^^^^^^^^^^^^^^
|
| 38 | + | |
| 39 | + = help: add #![feature(const_fn)] to the crate attributes to enable |
30 | 40 |
|
31 | 41 | error: aborting due to 5 previous errors
|
32 | 42 |
|
| 43 | +For more information about this error, try `rustc --explain E0723`. |
0 commit comments