]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/fn-body-optional-syntactic-pass.rs
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / parser / fn-body-optional-syntactic-pass.rs
1 // Ensures that all `fn` forms having or lacking a body are syntactically valid.
2
3 // check-pass
4
5 fn main() {}
6
7 #[cfg(FALSE)]
8 fn syntax() {
9 fn f();
10 fn f() {}
11
12 trait X {
13 fn f();
14 fn f() {}
15 }
16
17 impl X for Y {
18 fn f();
19 fn f() {}
20 }
21
22 impl Y {
23 fn f();
24 fn f() {}
25 }
26
27 extern {
28 fn f();
29 fn f() {}
30 }
31 }