Add comment + move derive helper

This commit is contained in:
Rune Tynan 2021-02-08 15:45:50 -05:00
parent a26fa74d3c
commit ce02b7f7a6
No known key found for this signature in database
GPG Key ID: 7ECC932F8B2C731E
3 changed files with 5 additions and 1 deletions

View File

@ -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,

View File

@ -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

View File

@ -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
}