diff --git a/tests/rustdoc-js/alias-sort.js b/tests/rustdoc-js/alias-sort.js new file mode 100644 index 0000000000000..245ff416643c7 --- /dev/null +++ b/tests/rustdoc-js/alias-sort.js @@ -0,0 +1,10 @@ +// rank doc aliases lower than exact matches +// regression test for + +const EXPECTED = { + 'query': 'foobazbar', + 'others': [ + { 'name': 'foobazbar' }, + { 'name': 'foo' }, + ], +}; diff --git a/tests/rustdoc-js/alias-sort.rs b/tests/rustdoc-js/alias-sort.rs new file mode 100644 index 0000000000000..542bb4be4387e --- /dev/null +++ b/tests/rustdoc-js/alias-sort.rs @@ -0,0 +1,5 @@ +/// asdf +pub fn foobazbar() {} + +#[doc(alias("foobazbar"))] +pub fn foo() {}