Skip to content

Commit 6d10fd0

Browse files
Add regression test for rustdoc duplicated blanket impls
1 parent caa770a commit 6d10fd0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/rustdoc/duplicated_impl.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// This test ensures that the same implementation doesn't show more than once.
2+
// It's a regression test for https://github.com./rust-lang/rust/issues/96036.
3+
4+
#![crate_name = "foo"]
5+
6+
// We check that there is only one "impl<T> Something<Whatever> for T" listed in the
7+
// blanket implementations.
8+
9+
// @has 'foo/struct.Whatever.html'
10+
// @count - '//*[@id="blanket-implementations-list"]/section[@class="impl has-srclink"]' 1
11+
12+
pub trait Something<T> { }
13+
pub struct Whatever;
14+
impl<T> Something<Whatever> for T {}

0 commit comments

Comments
 (0)