Skip to content

Commit

Permalink
Add regression test for rustdoc duplicated blanket impls
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 17, 2022
1 parent caa770a commit 6d10fd0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/rustdoc/duplicated_impl.rs
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 {}

0 comments on commit 6d10fd0

Please sign in to comment.