blob: 04c2febeb97686fa67991cfea62f179152dae21d [file] [log] [blame]
error[E0658]: function pointers cannot appear in constant functions
--> $DIR/cmp_fn_pointers.rs:1:14
|
LL | const fn cmp(x: fn(), y: fn()) -> bool {
| ^
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
error[E0658]: function pointers cannot appear in constant functions
--> $DIR/cmp_fn_pointers.rs:1:23
|
LL | const fn cmp(x: fn(), y: fn()) -> bool {
| ^
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable
error: pointers cannot be reliably compared during const eval.
--> $DIR/cmp_fn_pointers.rs:4:14
|
LL | unsafe { x == y }
| ^^^^^^
|
= note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0658`.