Update ui tests to 2018 edition

This commit is contained in:
David Tolnay 2018-12-31 21:36:59 -05:00
parent ab3f4971f0
commit 05ab569a80
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
189 changed files with 401 additions and 490 deletions

View File

@ -7,7 +7,12 @@ fn ui() {
let config = compiletest::Config { let config = 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("-L deps/target/debug/deps".to_owned()), target_rustcflags: Some(String::from("\
--edition=2018 \
-L deps/target/debug/deps \
-Z unstable-options \
--extern serde_derive \
")),
..Default::default() ..Default::default()
}; };

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
struct Test<'a> { struct Test<'a> {

View File

@ -1,7 +1,7 @@
error: failed to parse borrowed lifetimes: "zzz" error: failed to parse borrowed lifetimes: "zzz"
--> $DIR/bad_lifetimes.rs:6:22 --> $DIR/bad_lifetimes.rs:5:22
| |
6 | #[serde(borrow = "zzz")] 5 | #[serde(borrow = "zzz")]
| ^^^^^ | ^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
struct Test<'a> { struct Test<'a> {

View File

@ -1,7 +1,7 @@
error: duplicate borrowed lifetime `'a` error: duplicate borrowed lifetime `'a`
--> $DIR/duplicate_lifetime.rs:6:22 --> $DIR/duplicate_lifetime.rs:5:22
| |
6 | #[serde(borrow = "'a + 'a")] 5 | #[serde(borrow = "'a + 'a")]
| ^^^^^^^^^ | ^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
struct Str<'a>(&'a str); struct Str<'a>(&'a str);

View File

@ -1,7 +1,7 @@
error: duplicate serde attribute `borrow` error: duplicate serde attribute `borrow`
--> $DIR/duplicate_variant.rs:9:13 --> $DIR/duplicate_variant.rs:8:13
| |
9 | #[serde(borrow)] 8 | #[serde(borrow)]
| ^^^^^^ | ^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
struct Test<'a> { struct Test<'a> {

View File

@ -1,7 +1,7 @@
error: at least one lifetime must be borrowed error: at least one lifetime must be borrowed
--> $DIR/empty_lifetimes.rs:6:22 --> $DIR/empty_lifetimes.rs:5:22
| |
6 | #[serde(borrow = "")] 5 | #[serde(borrow = "")]
| ^^ | ^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
struct Test { struct Test {

View File

@ -1,8 +1,8 @@
error: field `s` has no lifetimes to borrow error: field `s` has no lifetimes to borrow
--> $DIR/no_lifetimes.rs:6:5 --> $DIR/no_lifetimes.rs:5:5
| |
6 | / #[serde(borrow)] 5 | / #[serde(borrow)]
7 | | s: String, 6 | | s: String,
| |_____________^ | |_____________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
struct Str<'a>(&'a str); struct Str<'a>(&'a str);

View File

@ -1,9 +1,9 @@
error: #[serde(borrow)] may only be used on newtype variants error: #[serde(borrow)] may only be used on newtype variants
--> $DIR/struct_variant.rs:9:5 --> $DIR/struct_variant.rs:8:5
| |
9 | / #[serde(borrow)] 8 | / #[serde(borrow)]
10 | | S { s: Str<'a> }, 9 | | S { s: Str<'a> },
| |____________________^ | |____________________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
struct Test<'a> { struct Test<'a> {

View File

@ -1,8 +1,8 @@
error: field `s` does not have lifetime 'b error: field `s` does not have lifetime 'b
--> $DIR/wrong_lifetime.rs:6:5 --> $DIR/wrong_lifetime.rs:5:5
| |
6 | / #[serde(borrow = "'b")] 5 | / #[serde(borrow = "'b")]
7 | | s: &'a str, 6 | | s: &'a str,
| |______________^ | |______________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
#[serde(tag = "conflict", content = "conflict")] #[serde(tag = "conflict", content = "conflict")]

View File

@ -1,11 +1,11 @@
error: enum tags `conflict` for type and content conflict with each other error: enum tags `conflict` for type and content conflict with each other
--> $DIR/adjacent-tag.rs:5:1 --> $DIR/adjacent-tag.rs:4:1
| |
5 | / #[serde(tag = "conflict", content = "conflict")] 4 | / #[serde(tag = "conflict", content = "conflict")]
6 | | enum E { 5 | | enum E {
7 | | A, 6 | | A,
8 | | B, 7 | | B,
9 | | } 8 | | }
| |_^ | |_^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
use std::collections::HashMap; use std::collections::HashMap;

View File

@ -1,7 +1,7 @@
error: #[serde(flatten)] cannot be used on newtype structs error: #[serde(flatten)] cannot be used on newtype structs
--> $DIR/flatten-newtype-struct.rs:7:12 --> $DIR/flatten-newtype-struct.rs:6:12
| |
7 | struct Foo(#[serde(flatten)] HashMap<String, String>); 6 | struct Foo(#[serde(flatten)] HashMap<String, String>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
struct Foo { struct Foo {

View File

@ -1,8 +1,8 @@
error: #[serde(flatten)] can not be combined with #[serde(skip_deserializing)] error: #[serde(flatten)] can not be combined with #[serde(skip_deserializing)]
--> $DIR/flatten-skip-deserializing.rs:6:5 --> $DIR/flatten-skip-deserializing.rs:5:5
| |
6 | / #[serde(flatten, skip_deserializing)] 5 | / #[serde(flatten, skip_deserializing)]
7 | | other: Other, 6 | | other: Other,
| |________________^ | |________________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct Foo { struct Foo {

View File

@ -1,8 +1,8 @@
error: #[serde(flatten)] can not be combined with #[serde(skip_serializing_if = "...")] error: #[serde(flatten)] can not be combined with #[serde(skip_serializing_if = "...")]
--> $DIR/flatten-skip-serializing-if.rs:6:5 --> $DIR/flatten-skip-serializing-if.rs:5:5
| |
6 | / #[serde(flatten, skip_serializing_if = "Option::is_none")] 5 | / #[serde(flatten, skip_serializing_if = "Option::is_none")]
7 | | other: Option<Other>, 6 | | other: Option<Other>,
| |________________________^ | |________________________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct Foo { struct Foo {

View File

@ -1,8 +1,8 @@
error: #[serde(flatten)] can not be combined with #[serde(skip_serializing)] error: #[serde(flatten)] can not be combined with #[serde(skip_serializing)]
--> $DIR/flatten-skip-serializing.rs:6:5 --> $DIR/flatten-skip-serializing.rs:5:5
| |
6 | / #[serde(flatten, skip_serializing)] 5 | / #[serde(flatten, skip_serializing)]
7 | | other: Other, 6 | | other: Other,
| |________________^ | |________________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
use std::collections::HashMap; use std::collections::HashMap;

View File

@ -1,7 +1,7 @@
error: #[serde(flatten)] cannot be used on tuple structs error: #[serde(flatten)] cannot be used on tuple structs
--> $DIR/flatten-tuple-struct.rs:7:17 --> $DIR/flatten-tuple-struct.rs:6:17
| |
7 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>); 6 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
#[serde(tag = "conflict")] #[serde(tag = "conflict")]

View File

@ -1,13 +1,13 @@
error: variant field name `conflict` conflicts with internal tag error: variant field name `conflict` conflicts with internal tag
--> $DIR/internal-tag.rs:5:1 --> $DIR/internal-tag.rs:4:1
| |
5 | / #[serde(tag = "conflict")] 4 | / #[serde(tag = "conflict")]
6 | | enum E { 5 | | enum E {
7 | | A { 6 | | A {
8 | | #[serde(rename = "conflict")] 7 | | #[serde(rename = "conflict")]
9 | | x: (), 8 | | x: (),
10 | | }, 9 | | },
11 | | } 10 | | }
| |_^ | |_^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(default)] #[serde(default)]

View File

@ -1,7 +1,7 @@
error: #[serde(default)] can only be used on structs with named fields error: #[serde(default)] can only be used on structs with named fields
--> $DIR/enum.rs:6:1 --> $DIR/enum.rs:5:1
| |
6 | enum E { 5 | enum E {
| ^^^^ | ^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(default = "default_e")] #[serde(default = "default_e")]

View File

@ -1,7 +1,7 @@
error: #[serde(default = "...")] can only be used on structs with named fields error: #[serde(default = "...")] can only be used on structs with named fields
--> $DIR/enum_path.rs:6:1 --> $DIR/enum_path.rs:5:1
| |
6 | enum E { 5 | enum E {
| ^^^^ | ^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(default)] #[serde(default)]

View File

@ -1,7 +1,7 @@
error: #[serde(default)] can only be used on structs with named fields error: #[serde(default)] can only be used on structs with named fields
--> $DIR/nameless_struct_fields.rs:6:9 --> $DIR/nameless_struct_fields.rs:5:9
| |
6 | struct T(u8, u8); 5 | struct T(u8, u8);
| ^^^^^^^^ | ^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(default = "default_t")] #[serde(default = "default_t")]

View File

@ -1,7 +1,7 @@
error: #[serde(default = "...")] can only be used on structs with named fields error: #[serde(default = "...")] can only be used on structs with named fields
--> $DIR/nameless_struct_fields_path.rs:6:9 --> $DIR/nameless_struct_fields_path.rs:5:9
| |
6 | struct T(u8, u8); 5 | struct T(u8, u8);
| ^^^^^^^^ | ^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: unknown serde field attribute `serialize` error: unknown serde field attribute `serialize`
--> $DIR/rename-and-ser.rs:6:27 --> $DIR/rename-and-ser.rs:5:27
| |
6 | #[serde(rename = "x", serialize = "y")] 5 | #[serde(rename = "x", serialize = "y")]
| ^^^^^^^^^ | ^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: duplicate serde attribute `rename` error: duplicate serde attribute `rename`
--> $DIR/rename-rename-de.rs:7:13 --> $DIR/rename-rename-de.rs:6:13
| |
7 | #[serde(rename(deserialize = "y"))] 6 | #[serde(rename(deserialize = "y"))]
| ^^^^^^ | ^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: duplicate serde attribute `rename` error: duplicate serde attribute `rename`
--> $DIR/rename-ser-rename-ser.rs:6:38 --> $DIR/rename-ser-rename-ser.rs:5:38
| |
6 | #[serde(rename(serialize = "x"), rename(serialize = "y"))] 5 | #[serde(rename(serialize = "x"), rename(serialize = "y"))]
| ^^^^^^ | ^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: duplicate serde attribute `rename` error: duplicate serde attribute `rename`
--> $DIR/rename-ser-rename.rs:7:13 --> $DIR/rename-ser-rename.rs:6:13
| |
7 | #[serde(rename = "y")] 6 | #[serde(rename = "y")]
| ^^^^^^ | ^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: duplicate serde attribute `rename` error: duplicate serde attribute `rename`
--> $DIR/rename-ser-ser.rs:6:37 --> $DIR/rename-ser-ser.rs:5:37
| |
6 | #[serde(rename(serialize = "x", serialize = "y"))] 5 | #[serde(rename(serialize = "x", serialize = "y"))]
| ^^^^^^^^^ | ^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: duplicate serde attribute `rename` error: duplicate serde attribute `rename`
--> $DIR/two-rename-ser.rs:7:13 --> $DIR/two-rename-ser.rs:6:13
| |
7 | #[serde(rename(serialize = "y"))] 6 | #[serde(rename(serialize = "y"))]
| ^^^^^^ | ^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: duplicate serde attribute `serialize_with` error: duplicate serde attribute `serialize_with`
--> $DIR/with-and-serialize-with.rs:6:25 --> $DIR/with-and-serialize-with.rs:5:25
| |
6 | #[serde(with = "w", serialize_with = "s")] 5 | #[serde(with = "w", serialize_with = "s")]
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
#[serde(content = "c")] #[serde(content = "c")]

View File

@ -1,7 +1,7 @@
error: #[serde(tag = "...", content = "...")] must be used together error: #[serde(tag = "...", content = "...")] must be used together
--> $DIR/content-no-tag.rs:5:9 --> $DIR/content-no-tag.rs:4:9
| |
5 | #[serde(content = "c")] 4 | #[serde(content = "c")]
| ^^^^^^^ | ^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
#[serde(tag = "type")] #[serde(tag = "type")]

View File

@ -1,7 +1,7 @@
error: #[serde(tag = "...")] cannot be used with tuple variants error: #[serde(tag = "...")] cannot be used with tuple variants
--> $DIR/internal-tuple-variant.rs:7:5 --> $DIR/internal-tuple-variant.rs:6:5
| |
7 | Tuple(u8, u8), 6 | Tuple(u8, u8),
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
#[serde(untagged)] #[serde(untagged)]

View File

@ -1,19 +1,19 @@
error: untagged enum cannot have #[serde(tag = "...", content = "...")] error: untagged enum cannot have #[serde(tag = "...", content = "...")]
--> $DIR/untagged-and-adjacent.rs:5:9 --> $DIR/untagged-and-adjacent.rs:4:9
| |
5 | #[serde(untagged)] 4 | #[serde(untagged)]
| ^^^^^^^^ | ^^^^^^^^
error: untagged enum cannot have #[serde(tag = "...", content = "...")] error: untagged enum cannot have #[serde(tag = "...", content = "...")]
--> $DIR/untagged-and-adjacent.rs:6:9 --> $DIR/untagged-and-adjacent.rs:5:9
| |
6 | #[serde(tag = "t", content = "c")] 5 | #[serde(tag = "t", content = "c")]
| ^^^ | ^^^
error: untagged enum cannot have #[serde(tag = "...", content = "...")] error: untagged enum cannot have #[serde(tag = "...", content = "...")]
--> $DIR/untagged-and-adjacent.rs:6:20 --> $DIR/untagged-and-adjacent.rs:5:20
| |
6 | #[serde(tag = "t", content = "c")] 5 | #[serde(tag = "t", content = "c")]
| ^^^^^^^ | ^^^^^^^
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
#[serde(untagged)] #[serde(untagged)]

View File

@ -1,13 +1,13 @@
error: untagged enum cannot have #[serde(content = "...")] error: untagged enum cannot have #[serde(content = "...")]
--> $DIR/untagged-and-content.rs:5:9 --> $DIR/untagged-and-content.rs:4:9
| |
5 | #[serde(untagged)] 4 | #[serde(untagged)]
| ^^^^^^^^ | ^^^^^^^^
error: untagged enum cannot have #[serde(content = "...")] error: untagged enum cannot have #[serde(content = "...")]
--> $DIR/untagged-and-content.rs:6:9 --> $DIR/untagged-and-content.rs:5:9
| |
6 | #[serde(content = "c")] 5 | #[serde(content = "c")]
| ^^^^^^^ | ^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
#[serde(untagged)] #[serde(untagged)]

View File

@ -1,13 +1,13 @@
error: enum cannot be both untagged and internally tagged error: enum cannot be both untagged and internally tagged
--> $DIR/untagged-and-internal.rs:5:9 --> $DIR/untagged-and-internal.rs:4:9
| |
5 | #[serde(untagged)] 4 | #[serde(untagged)]
| ^^^^^^^^ | ^^^^^^^^
error: enum cannot be both untagged and internally tagged error: enum cannot be both untagged and internally tagged
--> $DIR/untagged-and-internal.rs:6:9 --> $DIR/untagged-and-internal.rs:5:9
| |
6 | #[serde(tag = "type")] 5 | #[serde(tag = "type")]
| ^^^ | ^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
#[serde(untagged)] #[serde(untagged)]

View File

@ -1,7 +1,7 @@
error: #[serde(untagged)] can only be used on enums error: #[serde(untagged)] can only be used on enums
--> $DIR/untagged-struct.rs:6:1 --> $DIR/untagged-struct.rs:5:1
| |
6 | struct S; 5 | struct S;
| ^^^^^^ | ^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> $DIR/boolean.rs:6:22 --> $DIR/boolean.rs:5:22
| |
6 | #[serde(rename = true)] 5 | #[serde(rename = true)]
| ^^^^ | ^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> $DIR/byte_character.rs:6:22 --> $DIR/byte_character.rs:5:22
| |
6 | #[serde(rename = b'a')] 5 | #[serde(rename = b'a')]
| ^^^^ | ^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> $DIR/byte_string.rs:6:22 --> $DIR/byte_string.rs:5:22
| |
6 | #[serde(rename = b"byte string")] 5 | #[serde(rename = b"byte string")]
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> $DIR/character.rs:6:22 --> $DIR/character.rs:5:22
| |
6 | #[serde(rename = 'a')] 5 | #[serde(rename = 'a')]
| ^^^ | ^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> $DIR/float.rs:6:22 --> $DIR/float.rs:5:22
| |
6 | #[serde(rename = 3.14)] 5 | #[serde(rename = 3.14)]
| ^^^^ | ^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> $DIR/integer.rs:6:22 --> $DIR/integer.rs:5:22
| |
6 | #[serde(rename = 100)] 5 | #[serde(rename = 100)]
| ^^^ | ^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(field_identifier, variant_identifier)] #[serde(field_identifier, variant_identifier)]

View File

@ -1,13 +1,13 @@
error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set
--> $DIR/both.rs:5:9 --> $DIR/both.rs:4:9
| |
5 | #[serde(field_identifier, variant_identifier)] 4 | #[serde(field_identifier, variant_identifier)]
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^
error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set
--> $DIR/both.rs:5:27 --> $DIR/both.rs:4:27
| |
5 | #[serde(field_identifier, variant_identifier)] 4 | #[serde(field_identifier, variant_identifier)]
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(field_identifier)] #[serde(field_identifier)]

View File

@ -1,7 +1,7 @@
error: #[serde(field_identifier)] can only be used on an enum error: #[serde(field_identifier)] can only be used on an enum
--> $DIR/field_struct.rs:6:1 --> $DIR/field_struct.rs:5:1
| |
6 | struct S; 5 | struct S;
| ^^^^^^ | ^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(field_identifier)] #[serde(field_identifier)]

View File

@ -1,7 +1,7 @@
error: #[serde(field_identifier)] may only contain unit variants error: #[serde(field_identifier)] may only contain unit variants
--> $DIR/field_tuple.rs:8:5 --> $DIR/field_tuple.rs:7:5
| |
8 | B(u8, u8), 7 | B(u8, u8),
| ^^^^^^^^^ | ^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(field_identifier)] #[serde(field_identifier)]

View File

@ -1,7 +1,7 @@
error: `Other` must be the last variant error: `Other` must be the last variant
--> $DIR/newtype_not_last.rs:8:5 --> $DIR/newtype_not_last.rs:7:5
| |
8 | Other(String), 7 | Other(String),
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(field_identifier)] #[serde(field_identifier)]

View File

@ -1,8 +1,8 @@
error: #[serde(other)] must be on a unit variant error: #[serde(other)] must be on a unit variant
--> $DIR/not_unit.rs:8:5 --> $DIR/not_unit.rs:7:5
| |
8 | / #[serde(other)] 7 | / #[serde(other)]
9 | | Other(u8, u8), 8 | | Other(u8, u8),
| |_________________^ | |_________________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(field_identifier)] #[serde(field_identifier)]

View File

@ -1,8 +1,8 @@
error: #[serde(other)] must be on the last variant error: #[serde(other)] must be on the last variant
--> $DIR/other_not_last.rs:8:5 --> $DIR/other_not_last.rs:7:5
| |
8 | / #[serde(other)] 7 | / #[serde(other)]
9 | | Other, 8 | | Other,
| |_________^ | |_________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(untagged)] #[serde(untagged)]

View File

@ -1,8 +1,8 @@
error: #[serde(other)] cannot appear on untagged enum error: #[serde(other)] cannot appear on untagged enum
--> $DIR/other_untagged.rs:7:5 --> $DIR/other_untagged.rs:6:5
| |
7 | / #[serde(other)] 6 | / #[serde(other)]
8 | | Other, 7 | | Other,
| |_________^ | |_________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(variant_identifier)] #[serde(variant_identifier)]

View File

@ -1,8 +1,8 @@
error: #[serde(other)] may not be used on a variant identifier error: #[serde(other)] may not be used on a variant identifier
--> $DIR/other_variant.rs:7:5 --> $DIR/other_variant.rs:6:5
| |
7 | / #[serde(other)] 6 | / #[serde(other)]
8 | | Other, 7 | | Other,
| |_________^ | |_________^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(variant_identifier)] #[serde(variant_identifier)]

View File

@ -1,7 +1,7 @@
error: #[serde(variant_identifier)] can only be used on an enum error: #[serde(variant_identifier)] can only be used on an enum
--> $DIR/variant_struct.rs:6:1 --> $DIR/variant_struct.rs:5:1
| |
6 | struct S; 5 | struct S;
| ^^^^^^ | ^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
#[serde(variant_identifier)] #[serde(variant_identifier)]

View File

@ -1,7 +1,7 @@
error: #[serde(variant_identifier)] may only contain unit variants error: #[serde(variant_identifier)] may only contain unit variants
--> $DIR/variant_tuple.rs:8:5 --> $DIR/variant_tuple.rs:7:5
| |
8 | B(u8, u8), 7 | B(u8, u8),
| ^^^^^^^^^ | ^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: malformed bound attribute, expected `bound(serialize = ..., deserialize = ...)` error: malformed bound attribute, expected `bound(serialize = ..., deserialize = ...)`
--> $DIR/bound.rs:6:19 --> $DIR/bound.rs:5:19
| |
6 | #[serde(bound(unknown))] 5 | #[serde(bound(unknown))]
| ^^^^^^^ | ^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Serialize;
extern crate serde_derive;
#[derive(Serialize)] #[derive(Serialize)]
struct S { struct S {

View File

@ -1,7 +1,7 @@
error: malformed rename attribute, expected `rename(serialize = ..., deserialize = ...)` error: malformed rename attribute, expected `rename(serialize = ..., deserialize = ...)`
--> $DIR/rename.rs:6:20 --> $DIR/rename.rs:5:20
| |
6 | #[serde(rename(unknown))] 5 | #[serde(rename(unknown))]
| ^^^^^^^ | ^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,5 +1,4 @@
#[macro_use] use serde_derive::Deserialize;
extern crate serde_derive;
#[derive(Deserialize)] #[derive(Deserialize)]
struct S<'de> { struct S<'de> {

Some files were not shown because too many files have changed in this diff Show More