mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-14 21:16:50 +00:00
rustdoc-json: Add test for #[automatically_derived] attribute
This commit is contained in:
parent
0b45675cfc
commit
7feac15ca7
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