summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/duplicate_impls
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/rustdoc/duplicate_impls
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc/duplicate_impls')
-rw-r--r--tests/rustdoc/duplicate_impls/impls.rs12
-rw-r--r--tests/rustdoc/duplicate_impls/issue-33054.rs14
2 files changed, 26 insertions, 0 deletions
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;