From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/rustdoc/issue-78701.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/rustdoc/issue-78701.rs (limited to 'src/test/rustdoc/issue-78701.rs') diff --git a/src/test/rustdoc/issue-78701.rs b/src/test/rustdoc/issue-78701.rs new file mode 100644 index 000000000..e3e46468f --- /dev/null +++ b/src/test/rustdoc/issue-78701.rs @@ -0,0 +1,20 @@ +#![crate_name = "foo"] + +// This test ensures that if a blanket impl has the same ID as another impl, it'll +// link to the blanket impl and not the other impl. Basically, we're checking if +// the ID is correctly derived. + +// @has 'foo/struct.AnotherStruct.html' +// @count - '//*[@class="sidebar"]//a[@href="#impl-AnAmazingTrait-for-AnotherStruct%3C()%3E"]' 1 +// @count - '//*[@class="sidebar"]//a[@href="#impl-AnAmazingTrait-for-AnotherStruct%3CT%3E"]' 1 + +pub trait Something {} + +pub trait AnAmazingTrait {} + +impl AnAmazingTrait for T {} + +pub struct AnotherStruct(T); + +impl Something for AnotherStruct {} +impl AnAmazingTrait for AnotherStruct<()> {} -- cgit v1.2.3