diff options
| author | bors <bors@rust-lang.org> | 2025-10-03 08:43:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-10-03 08:43:43 +0000 |
| commit | dd091003ace19d9556c647d87f7a9cd1e8dcc17e (patch) | |
| tree | e664b8e4a5837e0f2245f51c41765da6fce596cf /tests/rustdoc-js/trait-methods.rs | |
| parent | 3b8665c5ab3aeced9b01672404c3764583e722ca (diff) | |
| parent | c7d6857f750a8c957ebca81340faa379cc3d110f (diff) | |
| download | rust-dd091003ace19d9556c647d87f7a9cd1e8dcc17e.tar.gz rust-dd091003ace19d9556c647d87f7a9cd1e8dcc17e.zip | |
Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, r=GuillaumeGomez,notriddle
If a trait item appears in rustdoc search, hide the corrosponding impl items fixes rust-lang/rust#138251 cc `@notriddle`
Diffstat (limited to 'tests/rustdoc-js/trait-methods.rs')
| -rw-r--r-- | tests/rustdoc-js/trait-methods.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/rustdoc-js/trait-methods.rs b/tests/rustdoc-js/trait-methods.rs index c88f5edfd55..a741b361a33 100644 --- a/tests/rustdoc-js/trait-methods.rs +++ b/tests/rustdoc-js/trait-methods.rs @@ -2,3 +2,21 @@ pub trait MyTrait { type Item; fn next(&mut self) -> Option<Self::Item>; } + +pub struct Empty; + +impl MyTrait for Empty { + type Item = (); + fn next(&mut self) -> Option<()> { + None + } +} + +pub struct Void; + +impl MyTrait for Void { + type Item = (); + fn next(&mut self) -> Option<()> { + Some(()) + } +} |
