Skip to content

Commit ce02b7f

Browse files
committed
Add comment + move derive helper
1 parent a26fa74 commit ce02b7f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/rustdoc-json-types/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ pub enum StructType {
282282
}
283283

284284
#[non_exhaustive]
285-
#[serde(rename_all = "snake_case")]
286285
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
286+
#[serde(rename_all = "snake_case")]
287287
pub enum Modifiers {
288288
Const,
289289
Unsafe,

src/test/rustdoc-json/fns/header.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ pub async unsafe fn async_unsafe_fn() {}
1818
// @has - "$.index[*][?(@.name=='const_unsafe_fn')].inner.header[*]" '"const"'
1919
// @has - "$.index[*][?(@.name=='const_unsafe_fn')].inner.header[*]" '"unsafe"'
2020
pub const unsafe fn const_unsafe_fn() {}
21+
22+
// It's impossible for a function to be both const and async, so no test for that

src/test/rustdoc-json/methods/header.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ impl Foo {
2121
// @has - "$.index[*][?(@.name=='const_unsafe_meth')].inner.header[*]" '"const"'
2222
// @has - "$.index[*][?(@.name=='const_unsafe_meth')].inner.header[*]" '"unsafe"'
2323
pub const unsafe fn const_unsafe_meth() {}
24+
25+
// It's impossible for a method to be both const and async, so no test for that
2426
}

0 commit comments

Comments
 (0)