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