Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc-json: Add test for impl Trait for dyn Trait #133721

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/rustdoc-json/impls/trait-for-dyn-trait.rs
Original file line number Diff line number Diff line change
@@ -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
Loading