diff options
| author | Alona Enraght-Moony <code@alona.page> | 2023-04-16 11:50:15 +0000 |
|---|---|---|
| committer | Alona Enraght-Moony <code@alona.page> | 2025-03-31 20:42:49 +0000 |
| commit | 7feac15ca7f601b7ef0dd63e9113103f720f5405 (patch) | |
| tree | 221c763cc8586bb6b42db6dcf4ef163f340858ae | |
| parent | 0b45675cfcec57f30a3794e1a1e18423aa9cf200 (diff) | |
| download | rust-7feac15ca7f601b7ef0dd63e9113103f720f5405.tar.gz rust-7feac15ca7f601b7ef0dd63e9113103f720f5405.zip | |
rustdoc-json: Add test for #[automatically_derived] attribute
| -rw-r--r-- | tests/rustdoc-json/attrs/automatically_derived.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/rustdoc-json/attrs/automatically_derived.rs b/tests/rustdoc-json/attrs/automatically_derived.rs new file mode 100644 index 00000000000..4e1ab3d145e --- /dev/null +++ b/tests/rustdoc-json/attrs/automatically_derived.rs @@ -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' '[]' |
