about summary refs log tree commit diff
path: root/tests/rustdoc/source-code-pages/src-links-implementor-43893.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-05-05 15:21:06 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-05-05 17:47:17 +0200
commit099f730dcf95404e3f272cb2690a25077b9f2a4b (patch)
tree4065d89794e5f8dda65e80e4275fe5062e272122 /tests/rustdoc/source-code-pages/src-links-implementor-43893.rs
parentb796179f9888b0aff6edf9c393274d9f792a0700 (diff)
downloadrust-099f730dcf95404e3f272cb2690a25077b9f2a4b.tar.gz
rust-099f730dcf95404e3f272cb2690a25077b9f2a4b.zip
Created `tests/rustdoc/source-code-pages` subfolder to limit number of files at the top level
Diffstat (limited to 'tests/rustdoc/source-code-pages/src-links-implementor-43893.rs')
-rw-r--r--tests/rustdoc/source-code-pages/src-links-implementor-43893.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/rustdoc/source-code-pages/src-links-implementor-43893.rs b/tests/rustdoc/source-code-pages/src-links-implementor-43893.rs
new file mode 100644
index 00000000000..d9abdcde08d
--- /dev/null
+++ b/tests/rustdoc/source-code-pages/src-links-implementor-43893.rs
@@ -0,0 +1,21 @@
+//@ ignore-cross-compile
+
+// https://github.com/rust-lang/rust/issues/43893
+
+#![crate_name = "foo"]
+
+pub trait SomeTrait {}
+pub struct SomeStruct;
+
+//@ has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#11'
+impl SomeTrait for usize {}
+
+//@ has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#14-16'
+impl SomeTrait for SomeStruct {
+    // deliberately multi-line impl
+}
+
+pub trait AnotherTrait {}
+
+//@ has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#21'
+impl<T> AnotherTrait for T {}