From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/rustdoc/duplicate_impls/impls.rs | 12 ++++++++++++ tests/rustdoc/duplicate_impls/issue-33054.rs | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tests/rustdoc/duplicate_impls/impls.rs create mode 100644 tests/rustdoc/duplicate_impls/issue-33054.rs (limited to 'tests/rustdoc/duplicate_impls') diff --git a/tests/rustdoc/duplicate_impls/impls.rs b/tests/rustdoc/duplicate_impls/impls.rs new file mode 100644 index 000000000..6875ad272 --- /dev/null +++ b/tests/rustdoc/duplicate_impls/impls.rs @@ -0,0 +1,12 @@ +pub struct Foo; + +// just so that `Foo` doesn't show up on `Bar`s sidebar +pub mod bar { + pub trait Bar {} +} + +impl Foo { + pub fn new() -> Foo { Foo } +} + +impl bar::Bar for Foo {} diff --git a/tests/rustdoc/duplicate_impls/issue-33054.rs b/tests/rustdoc/duplicate_impls/issue-33054.rs new file mode 100644 index 000000000..c1f95ac91 --- /dev/null +++ b/tests/rustdoc/duplicate_impls/issue-33054.rs @@ -0,0 +1,14 @@ +// ignore-tidy-linelength + +// @has issue_33054/impls/struct.Foo.html +// @has - '//h3[@class="code-header"]' 'impl Foo' +// @has - '//h3[@class="code-header"]' 'impl Bar for Foo' +// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1 +// @count - '//*[@id="main-content"]/div[@id="implementations-list"]/details/summary/*[@class="impl has-srclink"]' 1 +// @has issue_33054/impls/bar/trait.Bar.html +// @has - '//h3[@class="code-header"]' 'impl Bar for Foo' +// @count - '//*[@class="struct"]' 1 +pub mod impls; + +#[doc(inline)] +pub use impls as impls2; -- cgit v1.2.3