rust/tests/ui/parser/no-const-fn-in-extern-block.rs
2024-10-11 11:30:08 -04:00

10 lines
310 B
Rust

extern "C" {
const fn foo();
//~^ ERROR functions in `extern` blocks cannot have qualifiers
const unsafe fn bar();
//~^ ERROR functions in `extern` blocks cannot have qualifiers
//~| ERROR items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
}
fn main() {}