We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e0a2a7 commit 9b8a6b9Copy full SHA for 9b8a6b9
src/test/rustdoc/issue-78701.rs
@@ -0,0 +1,20 @@
1
+#![crate_name = "foo"]
2
+
3
+// This test ensures that if a blanket impl has the same ID as another impl, it'll
4
+// link to the blanket impl and not the other impl. Basically, we're checking if
5
+// the ID is correctly derived.
6
7
+// @has 'foo/struct.AnotherStruct.html'
8
+// @count - '//*[@class="sidebar"]//a[@href="#impl-AnAmazingTrait"]' 1
9
+// @count - '//*[@class="sidebar"]//a[@href="#impl-AnAmazingTrait-1"]' 1
10
11
+pub trait Something {}
12
13
+pub trait AnAmazingTrait {}
14
15
+impl<T: Something> AnAmazingTrait for T {}
16
17
+pub struct AnotherStruct<T>(T);
18
19
+impl<T: Something> Something for AnotherStruct<T> {}
20
+impl AnAmazingTrait for AnotherStruct<()> {}
0 commit comments