mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 02:43:45 +00:00
17 lines
265 B
Rust
17 lines
265 B
Rust
![]() |
const fn make_fn_ptr() -> fn() {
|
||
|
|| {}
|
||
|
}
|
||
|
|
||
|
static STAT: () = make_fn_ptr()();
|
||
|
//~^ ERROR function pointer
|
||
|
|
||
|
const CONST: () = make_fn_ptr()();
|
||
|
//~^ ERROR function pointer
|
||
|
|
||
|
const fn call_ptr() {
|
||
|
make_fn_ptr()();
|
||
|
//~^ ERROR function pointer
|
||
|
}
|
||
|
|
||
|
fn main() {}
|