Add comment + move derive helper
This commit is contained in:
parent
a26fa74d3c
commit
ce02b7f7a6
3 changed files with 5 additions and 1 deletions
|
@ -282,8 +282,8 @@ pub enum StructType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[serde(rename_all = "snake_case")]
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||||
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum Modifiers {
|
pub enum Modifiers {
|
||||||
Const,
|
Const,
|
||||||
Unsafe,
|
Unsafe,
|
||||||
|
|
|
@ -18,3 +18,5 @@ pub async unsafe fn async_unsafe_fn() {}
|
||||||
// @has - "$.index[*][?(@.name=='const_unsafe_fn')].inner.header[*]" '"const"'
|
// @has - "$.index[*][?(@.name=='const_unsafe_fn')].inner.header[*]" '"const"'
|
||||||
// @has - "$.index[*][?(@.name=='const_unsafe_fn')].inner.header[*]" '"unsafe"'
|
// @has - "$.index[*][?(@.name=='const_unsafe_fn')].inner.header[*]" '"unsafe"'
|
||||||
pub const unsafe fn const_unsafe_fn() {}
|
pub const unsafe fn const_unsafe_fn() {}
|
||||||
|
|
||||||
|
// It's impossible for a function to be both const and async, so no test for that
|
||||||
|
|
|
@ -21,4 +21,6 @@ impl Foo {
|
||||||
// @has - "$.index[*][?(@.name=='const_unsafe_meth')].inner.header[*]" '"const"'
|
// @has - "$.index[*][?(@.name=='const_unsafe_meth')].inner.header[*]" '"const"'
|
||||||
// @has - "$.index[*][?(@.name=='const_unsafe_meth')].inner.header[*]" '"unsafe"'
|
// @has - "$.index[*][?(@.name=='const_unsafe_meth')].inner.header[*]" '"unsafe"'
|
||||||
pub const unsafe fn const_unsafe_meth() {}
|
pub const unsafe fn const_unsafe_meth() {}
|
||||||
|
|
||||||
|
// It's impossible for a method to be both const and async, so no test for that
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue