rustdoc-json: Add test for #[automatically_derived] attribute
This commit is contained in:
parent
0b45675cfc
commit
7feac15ca7
1 changed files with 13 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue