]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/fn-header-syntactic-pass.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / parser / fn-header-syntactic-pass.rs
1 // Ensures that all `fn` forms can have all the function qualifiers syntactically.
2
3 // check-pass
4 // edition:2018
5
6 fn main() {}
7
8 #[cfg(FALSE)]
9 fn syntax() {
10     async fn f();
11     unsafe fn f();
12     const fn f();
13     extern "C" fn f();
14     const async unsafe extern "C" fn f();
15
16     trait X {
17         async fn f();
18         unsafe fn f();
19         const fn f();
20         extern "C" fn f();
21         const async unsafe extern "C" fn f();
22     }
23
24     impl X for Y {
25         async fn f();
26         unsafe fn f();
27         const fn f();
28         extern "C" fn f();
29         const async unsafe extern "C" fn f();
30     }
31
32     impl Y {
33         async fn f();
34         unsafe fn f();
35         const fn f();
36         extern "C" fn f();
37         const async unsafe extern "C" fn f();
38     }
39
40     extern "C" {
41         fn f();
42         fn f();
43         fn f();
44         fn f();
45         fn f();
46     }
47 }