diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-12-02 17:36:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-02 17:36:05 +0100 |
| commit | 7fdbde0e18b24fa75ffc8e6fc1c33d65457487f4 (patch) | |
| tree | 223ee29d717b6f593db2d84246d68748a1513cba | |
| parent | 08f1f286997221d28cf42e8275bd675202f9897c (diff) | |
| parent | b5d73fc16739abd2982af2e49de1e143bf7248e3 (diff) | |
| download | rust-7fdbde0e18b24fa75ffc8e6fc1c33d65457487f4.tar.gz rust-7fdbde0e18b24fa75ffc8e6fc1c33d65457487f4.zip | |
Rollup merge of #133721 - aDotInTheVoid:rdj-dyn-link, r=GuillaumeGomez
rustdoc-json: Add test for `impl Trait for dyn Trait` Found while investigating #133719 Helps with #81359 r? `@GuillaumeGomez`
| -rw-r--r-- | tests/rustdoc-json/impls/trait-for-dyn-trait.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/rustdoc-json/impls/trait-for-dyn-trait.rs b/tests/rustdoc-json/impls/trait-for-dyn-trait.rs new file mode 100644 index 00000000000..0fbb4df0028 --- /dev/null +++ b/tests/rustdoc-json/impls/trait-for-dyn-trait.rs @@ -0,0 +1,15 @@ +//@ set t1 = '$.index[*][?(@.name=="T1")].id' +pub trait T1 {} + +//@ set t2 = '$.index[*][?(@.name=="T2")].id' +pub trait T2 {} + +/// Fun impl +impl T1 for dyn T2 {} + +//@ set impl = '$.index[*][?(@.docs=="Fun impl")].id' +//@ is '$.index[*][?(@.name=="T1")].inner.trait.implementations[*]' $impl +//@ is '$.index[*][?(@.name=="T2")].inner.trait.implementations' [] + +//@ is '$.index[*][?(@.docs=="Fun impl")].inner.impl.trait.id' $t1 +//@ is '$.index[*][?(@.docs=="Fun impl")].inner.impl.for.dyn_trait.traits[*].trait.id' $t2 |
