forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: fix duplicate blanket impls
Fixes rust-lang#96036 This is a different approach than rust-lang#96091, an approach that should have less performance impact.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// This test ensures that the same implementation doesn't show more than once. | ||
// It's a regression test for https://github.com/rust-lang/rust/issues/96036. | ||
|
||
#![crate_name = "foo"] | ||
|
||
// We check that there is only one "impl<T> Something<Whatever> for T" listed in the | ||
// blanket implementations. | ||
|
||
// @has 'foo/struct.Whatever.html' | ||
// @count - '//*[@id="blanket-implementations-list"]/section[@class="impl has-srclink"]' 1 | ||
|
||
pub trait Something<T> { } | ||
pub struct Whatever; | ||
impl<T> Something<Whatever> for T {} |