11error[E0658]: function pointers cannot appear in constant functions
2+ --> $DIR/cast_errors.rs:4:23
3+ |
4+ LL | const fn closure() -> fn() { || {} }
5+ | ^^^^
6+ |
7+ = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
8+ = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
9+
10+ error[E0658]: function pointer casts are not allowed in constant functions
211 --> $DIR/cast_errors.rs:4:30
312 |
413LL | const fn closure() -> fn() { || {} }
@@ -7,17 +16,17 @@ LL | const fn closure() -> fn() { || {} }
716 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
817 = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
918
10- error[E0658]: function pointers cannot appear in constant functions
11- --> $DIR/cast_errors.rs:7 :5
19+ error[E0658]: function pointer casts are not allowed in constant functions
20+ --> $DIR/cast_errors.rs:8 :5
1221 |
1322LL | (|| {}) as fn();
14- | ^^^^^^^^^^^^^^^
23+ | ^^^^^^^
1524 |
1625 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
1726 = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
1827
1928error[E0658]: function pointers cannot appear in constant functions
20- --> $DIR/cast_errors.rs:10 :16
29+ --> $DIR/cast_errors.rs:11 :16
2130 |
2231LL | const fn reify(f: fn()) -> unsafe fn() { f }
2332 | ^
@@ -26,14 +35,41 @@ LL | const fn reify(f: fn()) -> unsafe fn() { f }
2635 = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
2736
2837error[E0658]: function pointers cannot appear in constant functions
29- --> $DIR/cast_errors.rs:12:21
38+ --> $DIR/cast_errors.rs:11:28
39+ |
40+ LL | const fn reify(f: fn()) -> unsafe fn() { f }
41+ | ^^^^^^^^^^^
42+ |
43+ = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
44+ = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
45+
46+ error[E0658]: function pointer casts are not allowed in constant functions
47+ --> $DIR/cast_errors.rs:11:42
48+ |
49+ LL | const fn reify(f: fn()) -> unsafe fn() { f }
50+ | ^
51+ |
52+ = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
53+ = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
54+
55+ error[E0658]: function pointer casts are not allowed in constant functions
56+ --> $DIR/cast_errors.rs:15:21
57+ |
58+ LL | const fn reify2() { main as unsafe fn(); }
59+ | ^^^^
60+ |
61+ = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
62+ = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
63+
64+ error[E0658]: function pointer casts are not allowed in constant functions
65+ --> $DIR/cast_errors.rs:15:21
3066 |
3167LL | const fn reify2() { main as unsafe fn(); }
32- | ^^^^^^^^^^^^^^^^^^^
68+ | ^^^^
3369 |
3470 = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
3571 = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
3672
37- error: aborting due to 4 previous errors
73+ error: aborting due to 8 previous errors
3874
3975For more information about this error, try `rustc --explain E0658`.
0 commit comments