mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
22 lines
333 B
Rust
22 lines
333 B
Rust
extern "C" {
|
|
fn regular_in_block();
|
|
}
|
|
|
|
const extern "C" fn bar() {
|
|
unsafe {
|
|
regular_in_block();
|
|
//~^ ERROR: cannot call non-const function
|
|
}
|
|
}
|
|
|
|
extern "C" fn regular() {}
|
|
|
|
const extern "C" fn foo() {
|
|
unsafe {
|
|
regular();
|
|
//~^ ERROR: cannot call non-const function
|
|
}
|
|
}
|
|
|
|
fn main() {}
|