rust/tests/ui/parser/fn-body-optional-syntactic-pass.rs

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

32 lines
392 B
Rust
Raw Normal View History

// Ensures that all `fn` forms having or lacking a body are syntactically valid.
// check-pass
fn main() {}
#[cfg(FALSE)]
fn syntax() {
fn f();
fn f() {}
trait X {
fn f();
fn f() {}
}
impl X for Y {
fn f();
fn f() {}
}
impl Y {
fn f();
fn f() {}
}
2020-09-01 21:12:52 +00:00
extern "C" {
fn f();
fn f();
}
}