about summary refs log tree commit diff
path: root/src/test/rustdoc-js
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-05-12 14:15:31 -0700
committerMichael Howell <michael@notriddle.com>2022-05-12 14:15:31 -0700
commitd3fd6bfd308f1cca010086e30e75daaee984beab (patch)
treebb293684ebf33377b9e2165cfd7b65e75e6da154 /src/test/rustdoc-js
parentc6499fd9987a2b338892f56cea26c39a6fe64d18 (diff)
downloadrust-d3fd6bfd308f1cca010086e30e75daaee984beab.tar.gz
rust-d3fd6bfd308f1cca010086e30e75daaee984beab.zip
rustdoc: fix GUI crash when searching for magic JS property values
Diffstat (limited to 'src/test/rustdoc-js')
-rw-r--r--src/test/rustdoc-js/prototype.js16
-rw-r--r--src/test/rustdoc-js/prototype.rs4
2 files changed, 20 insertions, 0 deletions
diff --git a/src/test/rustdoc-js/prototype.js b/src/test/rustdoc-js/prototype.js
new file mode 100644
index 00000000000..2f1d841c3be
--- /dev/null
+++ b/src/test/rustdoc-js/prototype.js
@@ -0,0 +1,16 @@
+// exact-check
+
+const QUERY = ['constructor', '__proto__'];
+
+const EXPECTED = [
+    {
+        'others': [],
+        'returned': [],
+        'in_args': [],
+    },
+    {
+        'others': [],
+        'returned': [],
+        'in_args': [],
+    },
+];
diff --git a/src/test/rustdoc-js/prototype.rs b/src/test/rustdoc-js/prototype.rs
new file mode 100644
index 00000000000..5f6d73cc196
--- /dev/null
+++ b/src/test/rustdoc-js/prototype.rs
@@ -0,0 +1,4 @@
+// The alias needed to be there to reproduce the bug
+// that used to be here.
+#[doc(alias="other_alias")]
+pub fn something_else() {}