]> git.proxmox.com Git - rustc.git/blob - src/test/rustdoc-json/methods/qualifiers.rs
Update unsuspicious file list
[rustc.git] / src / test / rustdoc-json / methods / qualifiers.rs
1 // edition:2018
2
3 pub struct Foo;
4
5 impl Foo {
6 // @is "$.index[*][?(@.name=='const_meth')].inner.header.async" false
7 // @is "$.index[*][?(@.name=='const_meth')].inner.header.const" true
8 // @is "$.index[*][?(@.name=='const_meth')].inner.header.unsafe" false
9 pub const fn const_meth() {}
10
11 // @is "$.index[*][?(@.name=='nothing_meth')].inner.header.async" false
12 // @is "$.index[*][?(@.name=='nothing_meth')].inner.header.const" false
13 // @is "$.index[*][?(@.name=='nothing_meth')].inner.header.unsafe" false
14 pub fn nothing_meth() {}
15
16 // @is "$.index[*][?(@.name=='unsafe_meth')].inner.header.async" false
17 // @is "$.index[*][?(@.name=='unsafe_meth')].inner.header.const" false
18 // @is "$.index[*][?(@.name=='unsafe_meth')].inner.header.unsafe" true
19 pub unsafe fn unsafe_meth() {}
20
21 // @is "$.index[*][?(@.name=='async_meth')].inner.header.async" true
22 // @is "$.index[*][?(@.name=='async_meth')].inner.header.const" false
23 // @is "$.index[*][?(@.name=='async_meth')].inner.header.unsafe" false
24 pub async fn async_meth() {}
25
26 // @is "$.index[*][?(@.name=='async_unsafe_meth')].inner.header.async" true
27 // @is "$.index[*][?(@.name=='async_unsafe_meth')].inner.header.const" false
28 // @is "$.index[*][?(@.name=='async_unsafe_meth')].inner.header.unsafe" true
29 pub async unsafe fn async_unsafe_meth() {}
30
31 // @is "$.index[*][?(@.name=='const_unsafe_meth')].inner.header.async" false
32 // @is "$.index[*][?(@.name=='const_unsafe_meth')].inner.header.const" true
33 // @is "$.index[*][?(@.name=='const_unsafe_meth')].inner.header.unsafe" true
34 pub const unsafe fn const_unsafe_meth() {}
35
36 // It's impossible for a method to be both const and async, so no test for that
37 }