]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/duplicated_impl.rs
rustdoc: remove unused class `has-srclink`
[rust.git] / tests / rustdoc / duplicated_impl.rs
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"]' 1
11
12 pub trait Something<T> { }
13 pub struct Whatever;
14 impl<T> Something<Whatever> for T {}