about summary refs log tree commit diff
path: root/tests/rustdoc-gui/src/link_to_definition/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-gui/src/link_to_definition/lib.rs')
-rw-r--r--tests/rustdoc-gui/src/link_to_definition/lib.rs35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/src/link_to_definition/lib.rs b/tests/rustdoc-gui/src/link_to_definition/lib.rs
new file mode 100644
index 00000000000..419a9cceec5
--- /dev/null
+++ b/tests/rustdoc-gui/src/link_to_definition/lib.rs
@@ -0,0 +1,35 @@
+pub fn sub_fn() {
+    barbar();
+}
+fn barbar() {
+    bar(vec![], vec![], vec![], vec![], Bar { a: "a".into(), b: 0 });
+}
+
+pub struct Bar {
+    pub a: String,
+    pub b: u32,
+}
+
+pub fn foo(_b: &Bar) {}
+
+// The goal now is to add
+// a lot of lines so
+// that the next content
+// will be out of the screen
+// to allow us to test that
+// if the anchor changes to
+// something outside of the
+// current view, it'll
+// scroll to it as expected.
+
+// More filling content.
+
+pub fn bar(
+  _a: Vec<String>,
+  _b: Vec<String>,
+  _c: Vec<String>,
+  _d: Vec<String>,
+  _e: Bar,
+) {
+    sub_fn();
+}