Add comment + move derive helper
This commit is contained in:
parent
a26fa74d3c
commit
ce02b7f7a6
|
@ -282,8 +282,8 @@ pub enum StructType {
|
|||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum Modifiers {
|
||||
Const,
|
||||
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[*]" '"unsafe"'
|
||||
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[*]" '"unsafe"'
|
||||
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…
Reference in New Issue