Skip to content

Commit cdd69d6

Browse files
authored
Rollup merge of rust-lang#110406 - aDotInTheVoid:rdj-derived-impl-attr, r=GuillaumeGomez
rustdoc-json: Add test for #[automatically_derived] attribute ~~Will fail CI due to freestrings/jsonpath#91, but I wrote the test and don't want to forget it.~~ ~~We should look into fixing the freestrings impl, or moving to a different one, so we can test things like this. [Zulip Disussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/jsonpath-plus.20integration)~~ FIXED!!! By rust-lang#138763 r? ````@ghost```` ````@rustbot```` blocked
2 parents 0b4a81a + 7feac15 commit cdd69d6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#[derive(Default)]
2+
pub struct Derive;
3+
4+
pub struct Manual;
5+
6+
impl Default for Manual {
7+
fn default() -> Self {
8+
Self
9+
}
10+
}
11+
12+
//@ is '$.index[?(@.inner.impl.for.resolved_path.path == "Derive" && @.inner.impl.trait.path == "Default")].attrs' '["#[automatically_derived]"]'
13+
//@ is '$.index[?(@.inner.impl.for.resolved_path.path == "Manual" && @.inner.impl.trait.path == "Default")].attrs' '[]'

0 commit comments

Comments
 (0)