about summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-08-10 15:49:22 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-08-10 15:49:22 +0200
commit25e767b0ee95d21b62d2fb509809946005081d40 (patch)
treedef2b22baec17d7ca8e7c22341014c14e3ec8648 /tests/rustdoc
parentd528a49fd7c0447cc51406908fb13fe055d273aa (diff)
downloadrust-25e767b0ee95d21b62d2fb509809946005081d40.tar.gz
rust-25e767b0ee95d21b62d2fb509809946005081d40.zip
Ignore impl associated types in jump to def feature
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/jump-to-def-ice-assoc-types.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rustdoc/jump-to-def-ice-assoc-types.rs b/tests/rustdoc/jump-to-def-ice-assoc-types.rs
new file mode 100644
index 00000000000..9915c53668f
--- /dev/null
+++ b/tests/rustdoc/jump-to-def-ice-assoc-types.rs
@@ -0,0 +1,20 @@
+// This test ensures that associated types don't crash rustdoc jump to def.
+
+//@ compile-flags: -Zunstable-options --generate-link-to-definition
+
+
+#![crate_name = "foo"]
+
+//@ has 'src/foo/jump-to-def-ice-assoc-types.rs.html'
+
+pub trait Trait {
+    type Node;
+}
+
+pub fn y<G: Trait>() {
+    struct X<G>(G);
+
+    impl<G: Trait> Trait for X<G> {
+        type Node = G::Node;
+    }
+}