mirror of
https://github.com/serde-rs/json.git
synced 2025-10-03 15:56:28 +00:00
Update ui tests to 2018 edition
This commit is contained in:
parent
4d5234c8d9
commit
48980ef754
@ -5,7 +5,14 @@ fn ui() {
|
|||||||
compiletest::run_tests(&compiletest::Config {
|
compiletest::run_tests(&compiletest::Config {
|
||||||
mode: compiletest::common::Mode::Ui,
|
mode: compiletest::common::Mode::Ui,
|
||||||
src_base: std::path::PathBuf::from("tests/ui"),
|
src_base: std::path::PathBuf::from("tests/ui"),
|
||||||
target_rustcflags: Some(String::from("-L tests/deps/target/debug/deps")),
|
target_rustcflags: Some(String::from(
|
||||||
|
"\
|
||||||
|
--edition=2018 \
|
||||||
|
-L tests/deps/target/debug/deps \
|
||||||
|
-Z unstable-options \
|
||||||
|
--extern serde_json \
|
||||||
|
",
|
||||||
|
)),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#[macro_use]
|
use serde_json::json;
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
json!({ "a" });
|
json!({ "a" });
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: unexpected end of macro invocation
|
error: unexpected end of macro invocation
|
||||||
--> $DIR/missing_colon.rs:5:5
|
--> $DIR/missing_colon.rs:4:5
|
||||||
|
|
|
|
||||||
5 | json!({ "a" });
|
4 | json!({ "a" });
|
||||||
| ^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
| ^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||||
|
|
|
|
||||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#[macro_use]
|
use serde_json::json;
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
json!({ "a" : });
|
json!({ "a" : });
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: unexpected end of macro invocation
|
error: unexpected end of macro invocation
|
||||||
--> $DIR/missing_value.rs:5:5
|
--> $DIR/missing_value.rs:4:5
|
||||||
|
|
|
|
||||||
5 | json!({ "a" : });
|
4 | json!({ "a" : });
|
||||||
| ^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
| ^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||||
|
|
|
|
||||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#[macro_use]
|
use serde_json::json;
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
json!({ "a" : x });
|
json!({ "a" : x });
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error[E0425]: cannot find value `x` in this scope
|
error[E0425]: cannot find value `x` in this scope
|
||||||
--> $DIR/not_found.rs:5:19
|
--> $DIR/not_found.rs:4:19
|
||||||
|
|
|
|
||||||
5 | json!({ "a" : x });
|
4 | json!({ "a" : x });
|
||||||
| ^ not found in this scope
|
| ^ not found in this scope
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#[macro_use]
|
use serde_json::json;
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
json!({ "a" : ~ });
|
json!({ "a" : ~ });
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: unexpected end of macro invocation
|
error: unexpected end of macro invocation
|
||||||
--> $DIR/parse_expr.rs:5:5
|
--> $DIR/parse_expr.rs:4:5
|
||||||
|
|
|
|
||||||
5 | json!({ "a" : ~ });
|
4 | json!({ "a" : ~ });
|
||||||
| ^^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
| ^^^^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
||||||
|
|
|
|
||||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#[macro_use]
|
use serde_json::json;
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
json!({ "".s : true });
|
json!({ "".s : true });
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error[E0609]: no field `s` on type `&'static str`
|
error[E0609]: no field `s` on type `&'static str`
|
||||||
--> $DIR/parse_key.rs:5:16
|
--> $DIR/parse_key.rs:4:16
|
||||||
|
|
|
|
||||||
5 | json!({ "".s : true });
|
4 | json!({ "".s : true });
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#[macro_use]
|
use serde_json::json;
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
json!([ true => ]);
|
json!([ true => ]);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: no rules expected the token `=>`
|
error: no rules expected the token `=>`
|
||||||
--> $DIR/unexpected_after_array_element.rs:5:18
|
--> $DIR/unexpected_after_array_element.rs:4:18
|
||||||
|
|
|
|
||||||
5 | json!([ true => ]);
|
4 | json!([ true => ]);
|
||||||
| ^^ no rules expected this token in macro call
|
| ^^ no rules expected this token in macro call
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#[macro_use]
|
use serde_json::json;
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
json!({ "k": true => });
|
json!({ "k": true => });
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: no rules expected the token `=>`
|
error: no rules expected the token `=>`
|
||||||
--> $DIR/unexpected_after_map_entry.rs:5:23
|
--> $DIR/unexpected_after_map_entry.rs:4:23
|
||||||
|
|
|
|
||||||
5 | json!({ "k": true => });
|
4 | json!({ "k": true => });
|
||||||
| ^^ no rules expected this token in macro call
|
| ^^ no rules expected this token in macro call
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#[macro_use]
|
use serde_json::json;
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
json!({ : true });
|
json!({ : true });
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: no rules expected the token `:`
|
error: no rules expected the token `:`
|
||||||
--> $DIR/unexpected_colon.rs:5:13
|
--> $DIR/unexpected_colon.rs:4:13
|
||||||
|
|
|
|
||||||
5 | json!({ : true });
|
4 | json!({ : true });
|
||||||
| ^ no rules expected this token in macro call
|
| ^ no rules expected this token in macro call
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#[macro_use]
|
use serde_json::json;
|
||||||
extern crate serde_json;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
json!({ "a" , "b": true });
|
json!({ "a" , "b": true });
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: no rules expected the token `,`
|
error: no rules expected the token `,`
|
||||||
--> $DIR/unexpected_comma.rs:5:17
|
--> $DIR/unexpected_comma.rs:4:17
|
||||||
|
|
|
|
||||||
5 | json!({ "a" , "b": true });
|
4 | json!({ "a" , "b": true });
|
||||||
| ^ no rules expected this token in macro call
|
| ^ no rules expected this token in macro call
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user