rust/tests/ui/parser/no-const-fn-in-extern-block.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
255 B
Rust
Raw Normal View History

2020-09-01 21:12:52 +00:00
extern "C" {
const fn foo();
2024-10-11 15:30:03 +00:00
//~^ ERROR functions in `extern` blocks cannot
const unsafe fn bar();
2024-10-11 15:30:03 +00:00
//~^ ERROR functions in `extern` blocks cannot
//~| ERROR items in `extern` blocks without an `unsafe` qualifier cannot
}
fn main() {}