mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rollup merge of #110406 - aDotInTheVoid:rdj-derived-impl-attr, r=GuillaumeGomez
rustdoc-json: Add test for #[automatically_derived] attribute ~~Will fail CI due to https://github.com/freestrings/jsonpath/issues/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 #138763 r? ````@ghost```` ````@rustbot```` blocked
This commit is contained in:
commit
cdd69d6dc3
13
tests/rustdoc-json/attrs/automatically_derived.rs
Normal file
13
tests/rustdoc-json/attrs/automatically_derived.rs
Normal file
@ -0,0 +1,13 @@
|
||||
#[derive(Default)]
|
||||
pub struct Derive;
|
||||
|
||||
pub struct Manual;
|
||||
|
||||
impl Default for Manual {
|
||||
fn default() -> Self {
|
||||
Self
|
||||
}
|
||||
}
|
||||
|
||||
//@ is '$.index[?(@.inner.impl.for.resolved_path.path == "Derive" && @.inner.impl.trait.path == "Default")].attrs' '["#[automatically_derived]"]'
|
||||
//@ is '$.index[?(@.inner.impl.for.resolved_path.path == "Manual" && @.inner.impl.trait.path == "Default")].attrs' '[]'
|
Loading…
Reference in New Issue
Block a user