aboutsummaryrefslogtreecommitdiff
path: root/vendor/serde_json/tests/ui
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-01-08 00:21:28 +0300
committerValentin Popov <valentin@popov.link>2024-01-08 00:21:28 +0300
commit1b6a04ca5504955c571d1c97504fb45ea0befee4 (patch)
tree7579f518b23313e8a9748a88ab6173d5e030b227 /vendor/serde_json/tests/ui
parent5ecd8cf2cba827454317368b68571df0d13d7842 (diff)
downloadfparkan-1b6a04ca5504955c571d1c97504fb45ea0befee4.tar.xz
fparkan-1b6a04ca5504955c571d1c97504fb45ea0befee4.zip
Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
Diffstat (limited to 'vendor/serde_json/tests/ui')
-rw-r--r--vendor/serde_json/tests/ui/missing_colon.rs5
-rw-r--r--vendor/serde_json/tests/ui/missing_colon.stderr12
-rw-r--r--vendor/serde_json/tests/ui/missing_comma.rs5
-rw-r--r--vendor/serde_json/tests/ui/missing_comma.stderr13
-rw-r--r--vendor/serde_json/tests/ui/missing_value.rs5
-rw-r--r--vendor/serde_json/tests/ui/missing_value.stderr12
-rw-r--r--vendor/serde_json/tests/ui/not_found.rs5
-rw-r--r--vendor/serde_json/tests/ui/not_found.stderr5
-rw-r--r--vendor/serde_json/tests/ui/parse_expr.rs5
-rw-r--r--vendor/serde_json/tests/ui/parse_expr.stderr11
-rw-r--r--vendor/serde_json/tests/ui/parse_key.rs5
-rw-r--r--vendor/serde_json/tests/ui/parse_key.stderr5
-rw-r--r--vendor/serde_json/tests/ui/unexpected_after_array_element.rs5
-rw-r--r--vendor/serde_json/tests/ui/unexpected_after_array_element.stderr7
-rw-r--r--vendor/serde_json/tests/ui/unexpected_after_map_entry.rs5
-rw-r--r--vendor/serde_json/tests/ui/unexpected_after_map_entry.stderr7
-rw-r--r--vendor/serde_json/tests/ui/unexpected_colon.rs5
-rw-r--r--vendor/serde_json/tests/ui/unexpected_colon.stderr7
-rw-r--r--vendor/serde_json/tests/ui/unexpected_comma.rs5
-rw-r--r--vendor/serde_json/tests/ui/unexpected_comma.stderr7
20 files changed, 136 insertions, 0 deletions
diff --git a/vendor/serde_json/tests/ui/missing_colon.rs b/vendor/serde_json/tests/ui/missing_colon.rs
new file mode 100644
index 0000000..d93b7b9
--- /dev/null
+++ b/vendor/serde_json/tests/ui/missing_colon.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!({ "a" });
+}
diff --git a/vendor/serde_json/tests/ui/missing_colon.stderr b/vendor/serde_json/tests/ui/missing_colon.stderr
new file mode 100644
index 0000000..1515211
--- /dev/null
+++ b/vendor/serde_json/tests/ui/missing_colon.stderr
@@ -0,0 +1,12 @@
+error: unexpected end of macro invocation
+ --> tests/ui/missing_colon.rs:4:5
+ |
+4 | json!({ "a" });
+ | ^^^^^^^^^^^^^^ missing tokens in macro arguments
+ |
+note: while trying to match `@`
+ --> src/macros.rs
+ |
+ | (@array [$($elems:expr,)*]) => {
+ | ^
+ = note: this error originates in the macro `json_internal` which comes from the expansion of the macro `json` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/vendor/serde_json/tests/ui/missing_comma.rs b/vendor/serde_json/tests/ui/missing_comma.rs
new file mode 100644
index 0000000..8818c3e
--- /dev/null
+++ b/vendor/serde_json/tests/ui/missing_comma.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!({ "1": "" "2": "" });
+}
diff --git a/vendor/serde_json/tests/ui/missing_comma.stderr b/vendor/serde_json/tests/ui/missing_comma.stderr
new file mode 100644
index 0000000..bafa0f8
--- /dev/null
+++ b/vendor/serde_json/tests/ui/missing_comma.stderr
@@ -0,0 +1,13 @@
+error: no rules expected the token `"2"`
+ --> tests/ui/missing_comma.rs:4:21
+ |
+4 | json!({ "1": "" "2": "" });
+ | -^^^ no rules expected this token in macro call
+ | |
+ | help: missing comma here
+ |
+note: while trying to match `,`
+ --> src/macros.rs
+ |
+ | ($e:expr , $($tt:tt)*) => {};
+ | ^
diff --git a/vendor/serde_json/tests/ui/missing_value.rs b/vendor/serde_json/tests/ui/missing_value.rs
new file mode 100644
index 0000000..0ba14e2
--- /dev/null
+++ b/vendor/serde_json/tests/ui/missing_value.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!({ "a" : });
+}
diff --git a/vendor/serde_json/tests/ui/missing_value.stderr b/vendor/serde_json/tests/ui/missing_value.stderr
new file mode 100644
index 0000000..9c9de99
--- /dev/null
+++ b/vendor/serde_json/tests/ui/missing_value.stderr
@@ -0,0 +1,12 @@
+error: unexpected end of macro invocation
+ --> tests/ui/missing_value.rs:4:5
+ |
+4 | json!({ "a" : });
+ | ^^^^^^^^^^^^^^^^ missing tokens in macro arguments
+ |
+note: while trying to match `@`
+ --> src/macros.rs
+ |
+ | (@array [$($elems:expr,)*]) => {
+ | ^
+ = note: this error originates in the macro `json_internal` which comes from the expansion of the macro `json` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/vendor/serde_json/tests/ui/not_found.rs b/vendor/serde_json/tests/ui/not_found.rs
new file mode 100644
index 0000000..2df6870
--- /dev/null
+++ b/vendor/serde_json/tests/ui/not_found.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!({ "a" : x });
+}
diff --git a/vendor/serde_json/tests/ui/not_found.stderr b/vendor/serde_json/tests/ui/not_found.stderr
new file mode 100644
index 0000000..6fec180
--- /dev/null
+++ b/vendor/serde_json/tests/ui/not_found.stderr
@@ -0,0 +1,5 @@
+error[E0425]: cannot find value `x` in this scope
+ --> tests/ui/not_found.rs:4:19
+ |
+4 | json!({ "a" : x });
+ | ^ not found in this scope
diff --git a/vendor/serde_json/tests/ui/parse_expr.rs b/vendor/serde_json/tests/ui/parse_expr.rs
new file mode 100644
index 0000000..e7f1805
--- /dev/null
+++ b/vendor/serde_json/tests/ui/parse_expr.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!({ "a" : ~ });
+}
diff --git a/vendor/serde_json/tests/ui/parse_expr.stderr b/vendor/serde_json/tests/ui/parse_expr.stderr
new file mode 100644
index 0000000..cd3e1c9
--- /dev/null
+++ b/vendor/serde_json/tests/ui/parse_expr.stderr
@@ -0,0 +1,11 @@
+error: no rules expected the token `~`
+ --> tests/ui/parse_expr.rs:4:19
+ |
+4 | json!({ "a" : ~ });
+ | ^ no rules expected this token in macro call
+ |
+note: while trying to match meta-variable `$e:expr`
+ --> src/macros.rs
+ |
+ | ($e:expr , $($tt:tt)*) => {};
+ | ^^^^^^^
diff --git a/vendor/serde_json/tests/ui/parse_key.rs b/vendor/serde_json/tests/ui/parse_key.rs
new file mode 100644
index 0000000..858bd71
--- /dev/null
+++ b/vendor/serde_json/tests/ui/parse_key.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!({ "".s : true });
+}
diff --git a/vendor/serde_json/tests/ui/parse_key.stderr b/vendor/serde_json/tests/ui/parse_key.stderr
new file mode 100644
index 0000000..15662dc
--- /dev/null
+++ b/vendor/serde_json/tests/ui/parse_key.stderr
@@ -0,0 +1,5 @@
+error[E0609]: no field `s` on type `&'static str`
+ --> tests/ui/parse_key.rs:4:16
+ |
+4 | json!({ "".s : true });
+ | ^ unknown field
diff --git a/vendor/serde_json/tests/ui/unexpected_after_array_element.rs b/vendor/serde_json/tests/ui/unexpected_after_array_element.rs
new file mode 100644
index 0000000..226c58c
--- /dev/null
+++ b/vendor/serde_json/tests/ui/unexpected_after_array_element.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!([ true => ]);
+}
diff --git a/vendor/serde_json/tests/ui/unexpected_after_array_element.stderr b/vendor/serde_json/tests/ui/unexpected_after_array_element.stderr
new file mode 100644
index 0000000..ef449f7
--- /dev/null
+++ b/vendor/serde_json/tests/ui/unexpected_after_array_element.stderr
@@ -0,0 +1,7 @@
+error: no rules expected the token `=>`
+ --> tests/ui/unexpected_after_array_element.rs:4:18
+ |
+4 | json!([ true => ]);
+ | ^^ no rules expected this token in macro call
+ |
+ = note: while trying to match end of macro
diff --git a/vendor/serde_json/tests/ui/unexpected_after_map_entry.rs b/vendor/serde_json/tests/ui/unexpected_after_map_entry.rs
new file mode 100644
index 0000000..0dfb731
--- /dev/null
+++ b/vendor/serde_json/tests/ui/unexpected_after_map_entry.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!({ "k": true => });
+}
diff --git a/vendor/serde_json/tests/ui/unexpected_after_map_entry.stderr b/vendor/serde_json/tests/ui/unexpected_after_map_entry.stderr
new file mode 100644
index 0000000..c62d90b
--- /dev/null
+++ b/vendor/serde_json/tests/ui/unexpected_after_map_entry.stderr
@@ -0,0 +1,7 @@
+error: no rules expected the token `=>`
+ --> tests/ui/unexpected_after_map_entry.rs:4:23
+ |
+4 | json!({ "k": true => });
+ | ^^ no rules expected this token in macro call
+ |
+ = note: while trying to match end of macro
diff --git a/vendor/serde_json/tests/ui/unexpected_colon.rs b/vendor/serde_json/tests/ui/unexpected_colon.rs
new file mode 100644
index 0000000..e767ea6
--- /dev/null
+++ b/vendor/serde_json/tests/ui/unexpected_colon.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!({ : true });
+}
diff --git a/vendor/serde_json/tests/ui/unexpected_colon.stderr b/vendor/serde_json/tests/ui/unexpected_colon.stderr
new file mode 100644
index 0000000..7e47726
--- /dev/null
+++ b/vendor/serde_json/tests/ui/unexpected_colon.stderr
@@ -0,0 +1,7 @@
+error: no rules expected the token `:`
+ --> tests/ui/unexpected_colon.rs:4:13
+ |
+4 | json!({ : true });
+ | ^ no rules expected this token in macro call
+ |
+ = note: while trying to match end of macro
diff --git a/vendor/serde_json/tests/ui/unexpected_comma.rs b/vendor/serde_json/tests/ui/unexpected_comma.rs
new file mode 100644
index 0000000..338874e
--- /dev/null
+++ b/vendor/serde_json/tests/ui/unexpected_comma.rs
@@ -0,0 +1,5 @@
+use serde_json::json;
+
+fn main() {
+ json!({ "a" , "b": true });
+}
diff --git a/vendor/serde_json/tests/ui/unexpected_comma.stderr b/vendor/serde_json/tests/ui/unexpected_comma.stderr
new file mode 100644
index 0000000..552f399
--- /dev/null
+++ b/vendor/serde_json/tests/ui/unexpected_comma.stderr
@@ -0,0 +1,7 @@
+error: no rules expected the token `,`
+ --> tests/ui/unexpected_comma.rs:4:17
+ |
+4 | json!({ "a" , "b": true });
+ | ^ no rules expected this token in macro call
+ |
+ = note: while trying to match end of macro