3 // @is "$.index[*][?(@.name=='nothing_fn')].inner.header.async" false
4 // @is "$.index[*][?(@.name=='nothing_fn')].inner.header.const" false
5 // @is "$.index[*][?(@.name=='nothing_fn')].inner.header.unsafe" false
8 // @is "$.index[*][?(@.name=='unsafe_fn')].inner.header.async" false
9 // @is "$.index[*][?(@.name=='unsafe_fn')].inner.header.const" false
10 // @is "$.index[*][?(@.name=='unsafe_fn')].inner.header.unsafe" true
11 pub unsafe fn unsafe_fn() {}
13 // @is "$.index[*][?(@.name=='const_fn')].inner.header.async" false
14 // @is "$.index[*][?(@.name=='const_fn')].inner.header.const" true
15 // @is "$.index[*][?(@.name=='const_fn')].inner.header.unsafe" false
16 pub const fn const_fn() {}
18 // @is "$.index[*][?(@.name=='async_fn')].inner.header.async" true
19 // @is "$.index[*][?(@.name=='async_fn')].inner.header.const" false
20 // @is "$.index[*][?(@.name=='async_fn')].inner.header.unsafe" false
21 pub async fn async_fn() {}
23 // @is "$.index[*][?(@.name=='async_unsafe_fn')].inner.header.async" true
24 // @is "$.index[*][?(@.name=='async_unsafe_fn')].inner.header.const" false
25 // @is "$.index[*][?(@.name=='async_unsafe_fn')].inner.header.unsafe" true
26 pub async unsafe fn async_unsafe_fn() {}
28 // @is "$.index[*][?(@.name=='const_unsafe_fn')].inner.header.async" false
29 // @is "$.index[*][?(@.name=='const_unsafe_fn')].inner.header.const" true
30 // @is "$.index[*][?(@.name=='const_unsafe_fn')].inner.header.unsafe" true
31 pub const unsafe fn const_unsafe_fn() {}
33 // It's impossible for a function to be both const and async, so no test for that