2019-09-29 23:22:18 +00:00
|
|
|
extern "C" {
|
|
|
|
fn regular_in_block();
|
|
|
|
}
|
|
|
|
|
2020-09-01 21:28:11 +00:00
|
|
|
const extern "C" fn bar() {
|
2019-09-29 23:22:18 +00:00
|
|
|
unsafe {
|
|
|
|
regular_in_block();
|
2024-12-23 21:49:48 +00:00
|
|
|
//~^ ERROR: cannot call non-const function
|
2019-09-29 23:22:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-01 21:28:11 +00:00
|
|
|
extern "C" fn regular() {}
|
2019-09-29 23:22:18 +00:00
|
|
|
|
2020-09-01 21:28:11 +00:00
|
|
|
const extern "C" fn foo() {
|
2019-09-29 23:22:18 +00:00
|
|
|
unsafe {
|
|
|
|
regular();
|
2024-12-23 21:49:48 +00:00
|
|
|
//~^ ERROR: cannot call non-const function
|
2019-09-29 23:22:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|