summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-js-std/parser-ident.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /tests/rustdoc-js-std/parser-ident.js
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-js-std/parser-ident.js')
-rw-r--r--tests/rustdoc-js-std/parser-ident.js95
1 files changed, 77 insertions, 18 deletions
diff --git a/tests/rustdoc-js-std/parser-ident.js b/tests/rustdoc-js-std/parser-ident.js
index be42b7aa4..f65a7ce66 100644
--- a/tests/rustdoc-js-std/parser-ident.js
+++ b/tests/rustdoc-js-std/parser-ident.js
@@ -1,14 +1,6 @@
-const QUERY = [
- "R<!>",
- "!",
- "a!",
- "a!::b",
- "!::b",
- "a!::b!",
-];
-
const PARSED = [
{
+ query: "R<!>",
elems: [{
name: "r",
fullPath: ["r"],
@@ -16,11 +8,12 @@ const PARSED = [
pathLast: "r",
generics: [
{
- name: "!",
- fullPath: ["!"],
+ name: "never",
+ fullPath: ["never"],
pathWithoutLast: [],
- pathLast: "!",
+ pathLast: "never",
generics: [],
+ typeFilter: 15,
},
],
typeFilter: -1,
@@ -32,13 +25,14 @@ const PARSED = [
error: null,
},
{
+ query: "!",
elems: [{
- name: "!",
- fullPath: ["!"],
+ name: "never",
+ fullPath: ["never"],
pathWithoutLast: [],
- pathLast: "!",
+ pathLast: "never",
generics: [],
- typeFilter: -1,
+ typeFilter: 15,
}],
foundElems: 1,
original: "!",
@@ -47,6 +41,7 @@ const PARSED = [
error: null,
},
{
+ query: "a!",
elems: [{
name: "a",
fullPath: ["a"],
@@ -62,6 +57,7 @@ const PARSED = [
error: null,
},
{
+ query: "a!::b",
elems: [],
foundElems: 0,
original: "a!::b",
@@ -70,10 +66,20 @@ const PARSED = [
error: "Cannot have associated items in macros",
},
{
+ query: "!<T>",
+ elems: [],
+ foundElems: 0,
+ original: "!<T>",
+ returned: [],
+ userQuery: "!<t>",
+ error: "Never type `!` does not accept generic parameters",
+ },
+ {
+ query: "!::b",
elems: [{
name: "!::b",
- fullPath: ["!", "b"],
- pathWithoutLast: ["!"],
+ fullPath: ["never", "b"],
+ pathWithoutLast: ["never"],
pathLast: "b",
generics: [],
typeFilter: -1,
@@ -85,6 +91,59 @@ const PARSED = [
error: null,
},
{
+ query: "b::!",
+ elems: [],
+ foundElems: 0,
+ original: "b::!",
+ returned: [],
+ userQuery: "b::!",
+ error: "Never type `!` is not associated item",
+ },
+ {
+ query: "!::!",
+ elems: [],
+ foundElems: 0,
+ original: "!::!",
+ returned: [],
+ userQuery: "!::!",
+ error: "Never type `!` is not associated item",
+ },
+ {
+ query: "b::!::c",
+ elems: [],
+ foundElems: 0,
+ original: "b::!::c",
+ returned: [],
+ userQuery: "b::!::c",
+ error: "Never type `!` is not associated item",
+ },
+ {
+ query: "!::b<T>",
+ elems: [{
+ name: "!::b",
+ fullPath: ["never", "b"],
+ pathWithoutLast: ["never"],
+ pathLast: "b",
+ generics: [
+ {
+ name: "t",
+ fullPath: ["t"],
+ pathWithoutLast: [],
+ pathLast: "t",
+ generics: [],
+ typeFilter: -1,
+ }
+ ],
+ typeFilter: -1,
+ }],
+ foundElems: 1,
+ original: "!::b<T>",
+ returned: [],
+ userQuery: "!::b<t>",
+ error: null,
+ },
+ {
+ query: "a!::b!",
elems: [],
foundElems: 0,
original: "a!::b!",