Revert "Ui tests with compile_error resolved at call site"

This reverts commit e77db40b8d55f000c04a5e0a42299d373318e1c3.
This commit is contained in:
David Tolnay 2023-06-07 20:50:51 -07:00
parent e77db40b8d
commit bbba632ab3
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
92 changed files with 0 additions and 467 deletions

View File

@ -1,10 +1,5 @@
error: failed to parse borrowed lifetimes: "zzz" error: failed to parse borrowed lifetimes: "zzz"
--> tests/ui/borrow/bad_lifetimes.rs:5:22 --> tests/ui/borrow/bad_lifetimes.rs:5:22
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | struct Test<'a> {
5 | #[serde(borrow = "zzz")] 5 | #[serde(borrow = "zzz")]
| ^^^^^ | ^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: duplicate borrowed lifetime `'a` error: duplicate borrowed lifetime `'a`
--> tests/ui/borrow/duplicate_lifetime.rs:5:22 --> tests/ui/borrow/duplicate_lifetime.rs:5:22
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | struct Test<'a> {
5 | #[serde(borrow = "'a + 'a")] 5 | #[serde(borrow = "'a + 'a")]
| ^^^^^^^^^ | ^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: duplicate serde attribute `borrow` error: duplicate serde attribute `borrow`
--> tests/ui/borrow/duplicate_variant.rs:9:15 --> tests/ui/borrow/duplicate_variant.rs:9:15
| |
6 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
9 | S(#[serde(borrow)] Str<'a>), 9 | S(#[serde(borrow)] Str<'a>),
| ^^^^^^ | ^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,21 +1,11 @@
error: at least one lifetime must be borrowed error: at least one lifetime must be borrowed
--> tests/ui/borrow/empty_lifetimes.rs:5:22 --> tests/ui/borrow/empty_lifetimes.rs:5:22
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | struct Test<'a> {
5 | #[serde(borrow = "")] 5 | #[serde(borrow = "")]
| ^^ | ^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: at least one lifetime must be borrowed error: at least one lifetime must be borrowed
--> tests/ui/borrow/empty_lifetimes.rs:7:22 --> tests/ui/borrow/empty_lifetimes.rs:7:22
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | #[serde(borrow = " ")] 7 | #[serde(borrow = " ")]
| ^^^^ | ^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: field `s` has no lifetimes to borrow error: field `s` has no lifetimes to borrow
--> tests/ui/borrow/no_lifetimes.rs:5:5 --> tests/ui/borrow/no_lifetimes.rs:5:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | struct Test {
5 | / #[serde(borrow)] 5 | / #[serde(borrow)]
6 | | s: String, 6 | | s: String,
| |_____________^ | |_____________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: #[serde(borrow)] may only be used on newtype variants error: #[serde(borrow)] may only be used on newtype variants
--> tests/ui/borrow/struct_variant.rs:8:5 --> tests/ui/borrow/struct_variant.rs:8:5
| |
6 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
7 | enum Test<'a> {
8 | / #[serde(borrow)] 8 | / #[serde(borrow)]
9 | | S { s: Str<'a> }, 9 | | S { s: Str<'a> },
| |____________________^ | |____________________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: field `s` does not have lifetime 'b error: field `s` does not have lifetime 'b
--> tests/ui/borrow/wrong_lifetime.rs:5:5 --> tests/ui/borrow/wrong_lifetime.rs:5:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | struct Test<'a> {
5 | / #[serde(borrow = "'b")] 5 | / #[serde(borrow = "'b")]
6 | | s: &'a str, 6 | | s: &'a str,
| |______________^ | |______________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,13 +1,9 @@
error: enum tags `conflict` for type and content conflict with each other error: enum tags `conflict` for type and content conflict with each other
--> tests/ui/conflict/adjacent-tag.rs:4:1 --> tests/ui/conflict/adjacent-tag.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(tag = "conflict", content = "conflict")] 4 | / #[serde(tag = "conflict", content = "conflict")]
5 | | enum E { 5 | | enum E {
6 | | A, 6 | | A,
7 | | B, 7 | | B,
8 | | } 8 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: #[serde(flatten)] cannot be used on newtype structs error: #[serde(flatten)] cannot be used on newtype structs
--> tests/ui/conflict/flatten-newtype-struct.rs:6:12 --> tests/ui/conflict/flatten-newtype-struct.rs:6:12
| |
5 | #[derive(Serialize)]
| --------- in this derive macro expansion
6 | struct Foo(#[serde(flatten)] HashMap<String, String>); 6 | struct Foo(#[serde(flatten)] HashMap<String, String>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: #[serde(flatten)] cannot be used on tuple structs error: #[serde(flatten)] cannot be used on tuple structs
--> tests/ui/conflict/flatten-tuple-struct.rs:6:17 --> tests/ui/conflict/flatten-tuple-struct.rs:6:17
| |
5 | #[derive(Serialize)]
| --------- in this derive macro expansion
6 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>); 6 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,8 @@
error: #[serde(from = "...")] and #[serde(try_from = "...")] conflict with each other error: #[serde(from = "...")] and #[serde(try_from = "...")] conflict with each other
--> tests/ui/conflict/from-try-from.rs:4:1 --> tests/ui/conflict/from-try-from.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(from = "u64", try_from = "u64")] 4 | / #[serde(from = "u64", try_from = "u64")]
5 | | struct S { 5 | | struct S {
6 | | a: u8, 6 | | a: u8,
7 | | } 7 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,8 +1,6 @@
error: variant field name `conflict` conflicts with internal tag error: variant field name `conflict` conflicts with internal tag
--> tests/ui/conflict/internal-tag-alias.rs:4:1 --> tests/ui/conflict/internal-tag-alias.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(tag = "conflict")] 4 | / #[serde(tag = "conflict")]
5 | | enum E { 5 | | enum E {
6 | | A { 6 | | A {
@ -11,5 +9,3 @@ error: variant field name `conflict` conflicts with internal tag
9 | | }, 9 | | },
10 | | } 10 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,8 +1,6 @@
error: variant field name `conflict` conflicts with internal tag error: variant field name `conflict` conflicts with internal tag
--> tests/ui/conflict/internal-tag.rs:4:1 --> tests/ui/conflict/internal-tag.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(tag = "conflict")] 4 | / #[serde(tag = "conflict")]
5 | | enum E { 5 | | enum E {
6 | | A { 6 | | A {
@ -11,5 +9,3 @@ error: variant field name `conflict` conflicts with internal tag
9 | | }, 9 | | },
10 | | } 10 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(default)] can only be used on structs with named fields error: #[serde(default)] can only be used on structs with named fields
--> tests/ui/default-attribute/enum.rs:5:1 --> tests/ui/default-attribute/enum.rs:5:1
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(default)]
5 | enum E { 5 | enum E {
| ^^^^ | ^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(default = "...")] can only be used on structs with named fields error: #[serde(default = "...")] can only be used on structs with named fields
--> tests/ui/default-attribute/enum_path.rs:5:1 --> tests/ui/default-attribute/enum_path.rs:5:1
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(default = "default_e")]
5 | enum E { 5 | enum E {
| ^^^^ | ^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(default)] can only be used on structs with named fields error: #[serde(default)] can only be used on structs with named fields
--> tests/ui/default-attribute/nameless_struct_fields.rs:5:9 --> tests/ui/default-attribute/nameless_struct_fields.rs:5:9
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(default)]
5 | struct T(u8, u8); 5 | struct T(u8, u8);
| ^^^^^^^^ | ^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(default = "...")] can only be used on structs with named fields error: #[serde(default = "...")] can only be used on structs with named fields
--> tests/ui/default-attribute/nameless_struct_fields_path.rs:5:9 --> tests/ui/default-attribute/nameless_struct_fields_path.rs:5:9
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(default = "default_t")]
5 | struct T(u8, u8); 5 | struct T(u8, u8);
| ^^^^^^^^ | ^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: unknown serde field attribute `serialize` error: unknown serde field attribute `serialize`
--> tests/ui/duplicate-attribute/rename-and-ser.rs:5:27 --> tests/ui/duplicate-attribute/rename-and-ser.rs:5:27
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename = "x", serialize = "y")] 5 | #[serde(rename = "x", serialize = "y")]
| ^^^^^^^^^ | ^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: duplicate serde attribute `rename` error: duplicate serde attribute `rename`
--> tests/ui/duplicate-attribute/rename-ser-rename-ser.rs:5:38 --> tests/ui/duplicate-attribute/rename-ser-rename-ser.rs:5:38
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename(serialize = "x"), rename(serialize = "y"))] 5 | #[serde(rename(serialize = "x"), rename(serialize = "y"))]
| ^^^^^^ | ^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: duplicate serde attribute `rename` error: duplicate serde attribute `rename`
--> tests/ui/duplicate-attribute/rename-ser-rename.rs:6:13 --> tests/ui/duplicate-attribute/rename-ser-rename.rs:6:13
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
...
6 | #[serde(rename = "y")] 6 | #[serde(rename = "y")]
| ^^^^^^ | ^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: duplicate serde attribute `rename` error: duplicate serde attribute `rename`
--> tests/ui/duplicate-attribute/rename-ser-ser.rs:5:37 --> tests/ui/duplicate-attribute/rename-ser-ser.rs:5:37
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename(serialize = "x", serialize = "y"))] 5 | #[serde(rename(serialize = "x", serialize = "y"))]
| ^^^^^^^^^ | ^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: duplicate serde attribute `rename` error: duplicate serde attribute `rename`
--> tests/ui/duplicate-attribute/two-rename-ser.rs:6:13 --> tests/ui/duplicate-attribute/two-rename-ser.rs:6:13
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
...
6 | #[serde(rename(serialize = "y"))] 6 | #[serde(rename(serialize = "y"))]
| ^^^^^^ | ^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: duplicate serde attribute `serialize_with` error: duplicate serde attribute `serialize_with`
--> tests/ui/duplicate-attribute/with-and-serialize-with.rs:5:25 --> tests/ui/duplicate-attribute/with-and-serialize-with.rs:5:25
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(with = "w", serialize_with = "s")] 5 | #[serde(with = "w", serialize_with = "s")]
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: #[serde(tag = "...", content = "...")] must be used together error: #[serde(tag = "...", content = "...")] must be used together
--> tests/ui/enum-representation/content-no-tag.rs:4:9 --> tests/ui/enum-representation/content-no-tag.rs:4:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(content = "c")] 4 | #[serde(content = "c")]
| ^^^^^^^ | ^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(tag = "...")] cannot be used with tuple variants error: #[serde(tag = "...")] cannot be used with tuple variants
--> tests/ui/enum-representation/internal-tuple-variant.rs:6:5 --> tests/ui/enum-representation/internal-tuple-variant.rs:6:5
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
...
6 | Tuple(u8, u8), 6 | Tuple(u8, u8),
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,31 +1,17 @@
error: untagged enum cannot have #[serde(tag = "...", content = "...")] error: untagged enum cannot have #[serde(tag = "...", content = "...")]
--> tests/ui/enum-representation/untagged-and-adjacent.rs:4:9 --> tests/ui/enum-representation/untagged-and-adjacent.rs:4:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(untagged)] 4 | #[serde(untagged)]
| ^^^^^^^^ | ^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: untagged enum cannot have #[serde(tag = "...", content = "...")] error: untagged enum cannot have #[serde(tag = "...", content = "...")]
--> tests/ui/enum-representation/untagged-and-adjacent.rs:5:9 --> tests/ui/enum-representation/untagged-and-adjacent.rs:5:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(untagged)]
5 | #[serde(tag = "t", content = "c")] 5 | #[serde(tag = "t", content = "c")]
| ^^^ | ^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: untagged enum cannot have #[serde(tag = "...", content = "...")] error: untagged enum cannot have #[serde(tag = "...", content = "...")]
--> tests/ui/enum-representation/untagged-and-adjacent.rs:5:20 --> tests/ui/enum-representation/untagged-and-adjacent.rs:5:20
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(untagged)]
5 | #[serde(tag = "t", content = "c")] 5 | #[serde(tag = "t", content = "c")]
| ^^^^^^^ | ^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,20 +1,11 @@
error: untagged enum cannot have #[serde(content = "...")] error: untagged enum cannot have #[serde(content = "...")]
--> tests/ui/enum-representation/untagged-and-content.rs:4:9 --> tests/ui/enum-representation/untagged-and-content.rs:4:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(untagged)] 4 | #[serde(untagged)]
| ^^^^^^^^ | ^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: untagged enum cannot have #[serde(content = "...")] error: untagged enum cannot have #[serde(content = "...")]
--> tests/ui/enum-representation/untagged-and-content.rs:5:9 --> tests/ui/enum-representation/untagged-and-content.rs:5:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(untagged)]
5 | #[serde(content = "c")] 5 | #[serde(content = "c")]
| ^^^^^^^ | ^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,20 +1,11 @@
error: enum cannot be both untagged and internally tagged error: enum cannot be both untagged and internally tagged
--> tests/ui/enum-representation/untagged-and-internal.rs:4:9 --> tests/ui/enum-representation/untagged-and-internal.rs:4:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(untagged)] 4 | #[serde(untagged)]
| ^^^^^^^^ | ^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: enum cannot be both untagged and internally tagged error: enum cannot be both untagged and internally tagged
--> tests/ui/enum-representation/untagged-and-internal.rs:5:9 --> tests/ui/enum-representation/untagged-and-internal.rs:5:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(untagged)]
5 | #[serde(tag = "type")] 5 | #[serde(tag = "type")]
| ^^^ | ^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(untagged)] can only be used on enums error: #[serde(untagged)] can only be used on enums
--> tests/ui/enum-representation/untagged-struct.rs:5:1 --> tests/ui/enum-representation/untagged-struct.rs:5:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(untagged)]
5 | struct S; 5 | struct S;
| ^^^^^^ | ^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> tests/ui/expected-string/boolean.rs:5:22 --> tests/ui/expected-string/boolean.rs:5:22
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename = true)] 5 | #[serde(rename = true)]
| ^^^^ | ^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> tests/ui/expected-string/byte_character.rs:5:22 --> tests/ui/expected-string/byte_character.rs:5:22
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename = b'a')] 5 | #[serde(rename = b'a')]
| ^^^^ | ^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> tests/ui/expected-string/byte_string.rs:5:22 --> tests/ui/expected-string/byte_string.rs:5:22
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename = b"byte string")] 5 | #[serde(rename = b"byte string")]
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> tests/ui/expected-string/character.rs:5:22 --> tests/ui/expected-string/character.rs:5:22
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename = 'a')] 5 | #[serde(rename = 'a')]
| ^^^ | ^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> tests/ui/expected-string/float.rs:5:22 --> tests/ui/expected-string/float.rs:5:22
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename = 3.14)] 5 | #[serde(rename = 3.14)]
| ^^^^ | ^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: expected serde rename attribute to be a string: `rename = "..."` error: expected serde rename attribute to be a string: `rename = "..."`
--> tests/ui/expected-string/integer.rs:5:22 --> tests/ui/expected-string/integer.rs:5:22
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename = 100)] 5 | #[serde(rename = 100)]
| ^^^ | ^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,19 +1,11 @@
error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set
--> tests/ui/identifier/both.rs:4:9 --> tests/ui/identifier/both.rs:4:9
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(field_identifier, variant_identifier)] 4 | #[serde(field_identifier, variant_identifier)]
| ^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set error: #[serde(field_identifier)] and #[serde(variant_identifier)] cannot both be set
--> tests/ui/identifier/both.rs:4:27 --> tests/ui/identifier/both.rs:4:27
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(field_identifier, variant_identifier)] 4 | #[serde(field_identifier, variant_identifier)]
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(field_identifier)] can only be used on an enum error: #[serde(field_identifier)] can only be used on an enum
--> tests/ui/identifier/field_struct.rs:5:1 --> tests/ui/identifier/field_struct.rs:5:1
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(field_identifier)]
5 | struct S; 5 | struct S;
| ^^^^^^ | ^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(field_identifier)] may only contain unit variants error: #[serde(field_identifier)] may only contain unit variants
--> tests/ui/identifier/field_tuple.rs:7:5 --> tests/ui/identifier/field_tuple.rs:7:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | B(u8, u8), 7 | B(u8, u8),
| ^^^^^^^^^ | ^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: `Other` must be the last variant error: `Other` must be the last variant
--> tests/ui/identifier/newtype_not_last.rs:7:5 --> tests/ui/identifier/newtype_not_last.rs:7:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | Other(String), 7 | Other(String),
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: #[serde(other)] must be on a unit variant error: #[serde(other)] must be on a unit variant
--> tests/ui/identifier/not_unit.rs:7:5 --> tests/ui/identifier/not_unit.rs:7:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | / #[serde(other)] 7 | / #[serde(other)]
8 | | Other(u8, u8), 8 | | Other(u8, u8),
| |_________________^ | |_________________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: #[serde(other)] must be on the last variant error: #[serde(other)] must be on the last variant
--> tests/ui/identifier/other_not_last.rs:7:5 --> tests/ui/identifier/other_not_last.rs:7:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | / #[serde(other)] 7 | / #[serde(other)]
8 | | Other, 8 | | Other,
| |_________^ | |_________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: #[serde(other)] cannot appear on untagged enum error: #[serde(other)] cannot appear on untagged enum
--> tests/ui/identifier/other_untagged.rs:6:5 --> tests/ui/identifier/other_untagged.rs:6:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
6 | / #[serde(other)] 6 | / #[serde(other)]
7 | | Other, 7 | | Other,
| |_________^ | |_________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: #[serde(other)] may not be used on a variant identifier error: #[serde(other)] may not be used on a variant identifier
--> tests/ui/identifier/other_variant.rs:6:5 --> tests/ui/identifier/other_variant.rs:6:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
6 | / #[serde(other)] 6 | / #[serde(other)]
7 | | Other, 7 | | Other,
| |_________^ | |_________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(variant_identifier)] can only be used on an enum error: #[serde(variant_identifier)] can only be used on an enum
--> tests/ui/identifier/variant_struct.rs:5:1 --> tests/ui/identifier/variant_struct.rs:5:1
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(variant_identifier)]
5 | struct S; 5 | struct S;
| ^^^^^^ | ^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(variant_identifier)] may only contain unit variants error: #[serde(variant_identifier)] may only contain unit variants
--> tests/ui/identifier/variant_tuple.rs:7:5 --> tests/ui/identifier/variant_tuple.rs:7:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
...
7 | B(u8, u8), 7 | B(u8, u8),
| ^^^^^^^^^ | ^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: malformed bound attribute, expected `bound(serialize = ..., deserialize = ...)` error: malformed bound attribute, expected `bound(serialize = ..., deserialize = ...)`
--> tests/ui/malformed/bound.rs:5:19 --> tests/ui/malformed/bound.rs:5:19
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(bound(unknown))] 5 | #[serde(bound(unknown))]
| ^^^^^^^ | ^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: unexpected end of input, expected an expression error: unexpected end of input, expected an expression
--> tests/ui/malformed/cut_off.rs:4:17 --> tests/ui/malformed/cut_off.rs:4:17
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(rename =)] 4 | #[serde(rename =)]
| ^ | ^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,20 +1,11 @@
error: expected attribute arguments in parentheses: #[serde(...)] error: expected attribute arguments in parentheses: #[serde(...)]
--> tests/ui/malformed/not_list.rs:4:3 --> tests/ui/malformed/not_list.rs:4:3
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde] 4 | #[serde]
| ^^^^^ | ^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected parentheses: #[serde(...)] error: expected parentheses: #[serde(...)]
--> tests/ui/malformed/not_list.rs:5:9 --> tests/ui/malformed/not_list.rs:5:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde]
5 | #[serde = "?"] 5 | #[serde = "?"]
| ^ | ^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: malformed rename attribute, expected `rename(serialize = ..., deserialize = ...)` error: malformed rename attribute, expected `rename(serialize = ..., deserialize = ...)`
--> tests/ui/malformed/rename.rs:5:20 --> tests/ui/malformed/rename.rs:5:20
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(rename(unknown))] 5 | #[serde(rename(unknown))]
| ^^^^^^^ | ^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: expected `=` error: expected `=`
--> tests/ui/malformed/trailing_expr.rs:5:32 --> tests/ui/malformed/trailing_expr.rs:5:32
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde(skip_serializing_if, x.is_empty())] 5 | #[serde(skip_serializing_if, x.is_empty())]
| ^ | ^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: cannot deserialize when there is a lifetime parameter called 'de error: cannot deserialize when there is a lifetime parameter called 'de
--> tests/ui/precondition/deserialize_de_lifetime.rs:4:10 --> tests/ui/precondition/deserialize_de_lifetime.rs:4:10
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | struct S<'de> { 4 | struct S<'de> {
| ^^^ | ^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,8 @@
error: cannot deserialize a dynamically sized struct error: cannot deserialize a dynamically sized struct
--> tests/ui/precondition/deserialize_dst.rs:4:1 --> tests/ui/precondition/deserialize_dst.rs:4:1
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | / struct S { 4 | / struct S {
5 | | string: String, 5 | | string: String,
6 | | slice: [u8], 6 | | slice: [u8],
7 | | } 7 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,13 +1,9 @@
error: field identifiers cannot be serialized error: field identifiers cannot be serialized
--> tests/ui/precondition/serialize_field_identifier.rs:4:1 --> tests/ui/precondition/serialize_field_identifier.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(field_identifier)] 4 | / #[serde(field_identifier)]
5 | | enum F { 5 | | enum F {
6 | | A, 6 | | A,
7 | | B, 7 | | B,
8 | | } 8 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,13 +1,9 @@
error: variant identifiers cannot be serialized error: variant identifiers cannot be serialized
--> tests/ui/precondition/serialize_variant_identifier.rs:4:1 --> tests/ui/precondition/serialize_variant_identifier.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(variant_identifier)] 4 | / #[serde(variant_identifier)]
5 | | enum F { 5 | | enum F {
6 | | A, 6 | | A,
7 | | B, 7 | | B,
8 | | } 8 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: failed to parse path: "~~~" error: failed to parse path: "~~~"
--> tests/ui/remote/bad_getter.rs:12:22 --> tests/ui/remote/bad_getter.rs:12:22
| |
9 | #[derive(Serialize)]
| --------- in this derive macro expansion
...
12 | #[serde(getter = "~~~")] 12 | #[serde(getter = "~~~")]
| ^^^^^ | ^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: failed to parse path: "~~~" error: failed to parse path: "~~~"
--> tests/ui/remote/bad_remote.rs:10:18 --> tests/ui/remote/bad_remote.rs:10:18
| |
9 | #[derive(Serialize)]
| --------- in this derive macro expansion
10 | #[serde(remote = "~~~")] 10 | #[serde(remote = "~~~")]
| ^^^^^ | ^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,19 +1,5 @@
error: remove generic parameters from this path error: remove generic parameters from this path
--> tests/ui/remote/double_generic.rs:11:18 --> tests/ui/remote/double_generic.rs:11:18
| |
10 | #[derive(Serialize, Deserialize)]
| --------- in this derive macro expansion
11 | #[serde(remote = "remote::StructGeneric<u8>")] 11 | #[serde(remote = "remote::StructGeneric<u8>")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
error: remove generic parameters from this path
--> tests/ui/remote/double_generic.rs:11:18
|
10 | #[derive(Serialize, Deserialize)]
| ----------- in this derive macro expansion
11 | #[serde(remote = "remote::StructGeneric<u8>")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,8 +1,6 @@
error: #[serde(getter = "...")] is not allowed in an enum error: #[serde(getter = "...")] is not allowed in an enum
--> tests/ui/remote/enum_getter.rs:10:1 --> tests/ui/remote/enum_getter.rs:10:1
| |
9 | #[derive(Serialize)]
| --------- in this derive macro expansion
10 | / #[serde(remote = "remote::E")] 10 | / #[serde(remote = "remote::E")]
11 | | pub enum E { 11 | | pub enum E {
12 | | A { 12 | | A {
@ -11,5 +9,3 @@ error: #[serde(getter = "...")] is not allowed in an enum
15 | | }, 15 | | },
16 | | } 16 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,8 @@
error: #[serde(getter = "...")] can only be used in structs that have #[serde(remote = "...")] error: #[serde(getter = "...")] can only be used in structs that have #[serde(remote = "...")]
--> tests/ui/remote/nonremote_getter.rs:4:1 --> tests/ui/remote/nonremote_getter.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / struct S { 4 | / struct S {
5 | | #[serde(getter = "S::get")] 5 | | #[serde(getter = "S::get")]
6 | | a: u8, 6 | | a: u8,
7 | | } 7 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: unknown rename rule `rename_all = "abc"`, expected one of "lowercase", "UPPERCASE", "PascalCase", "camelCase", "snake_case", "SCREAMING_SNAKE_CASE", "kebab-case", "SCREAMING-KEBAB-CASE" error: unknown rename rule `rename_all = "abc"`, expected one of "lowercase", "UPPERCASE", "PascalCase", "camelCase", "snake_case", "SCREAMING_SNAKE_CASE", "kebab-case", "SCREAMING-KEBAB-CASE"
--> tests/ui/rename/container_unknown_rename_rule.rs:4:22 --> tests/ui/rename/container_unknown_rename_rule.rs:4:22
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(rename_all = "abc")] 4 | #[serde(rename_all = "abc")]
| ^^^^^ | ^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: unknown rename rule `rename_all = "abc"`, expected one of "lowercase", "UPPERCASE", "PascalCase", "camelCase", "snake_case", "SCREAMING_SNAKE_CASE", "kebab-case", "SCREAMING-KEBAB-CASE" error: unknown rename rule `rename_all = "abc"`, expected one of "lowercase", "UPPERCASE", "PascalCase", "camelCase", "snake_case", "SCREAMING_SNAKE_CASE", "kebab-case", "SCREAMING-KEBAB-CASE"
--> tests/ui/rename/variant_unknown_rename_rule.rs:5:26 --> tests/ui/rename/variant_unknown_rename_rule.rs:5:26
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum S {
5 | #[serde(rename_all = "abc")] 5 | #[serde(rename_all = "abc")]
| ^^^^^ | ^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: #[serde(tag = "...")] can only be used on enums and structs with named fields error: #[serde(tag = "...")] can only be used on enums and structs with named fields
--> tests/ui/struct-representation/internally-tagged-tuple.rs:5:9 --> tests/ui/struct-representation/internally-tagged-tuple.rs:5:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(tag = "type")]
5 | struct S(u8, u8); 5 | struct S(u8, u8);
| ^^^^^^^^ | ^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,13 +1,9 @@
error: #[serde(transparent)] requires struct to have at most one transparent field error: #[serde(transparent)] requires struct to have at most one transparent field
--> tests/ui/transparent/at_most_one.rs:4:1 --> tests/ui/transparent/at_most_one.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(transparent)] 4 | / #[serde(transparent)]
5 | | struct S { 5 | | struct S {
6 | | a: u8, 6 | | a: u8,
7 | | b: u8, 7 | | b: u8,
8 | | } 8 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,8 +1,6 @@
error: #[serde(transparent)] requires at least one field that is neither skipped nor has a default error: #[serde(transparent)] requires at least one field that is neither skipped nor has a default
--> tests/ui/transparent/de_at_least_one.rs:4:1 --> tests/ui/transparent/de_at_least_one.rs:4:1
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | / #[serde(transparent)] 4 | / #[serde(transparent)]
5 | | struct S { 5 | | struct S {
6 | | #[serde(skip)] 6 | | #[serde(skip)]
@ -11,5 +9,3 @@ error: #[serde(transparent)] requires at least one field that is neither skipped
9 | | b: u8, 9 | | b: u8,
10 | | } 10 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,6 @@
error: #[serde(transparent)] is not allowed on an enum error: #[serde(transparent)] is not allowed on an enum
--> tests/ui/transparent/enum.rs:4:1 --> tests/ui/transparent/enum.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(transparent)] 4 | / #[serde(transparent)]
5 | | enum E {} 5 | | enum E {}
| |_________^ | |_________^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,13 +1,9 @@
error: #[serde(transparent)] requires at least one field that is not skipped error: #[serde(transparent)] requires at least one field that is not skipped
--> tests/ui/transparent/ser_at_least_one.rs:4:1 --> tests/ui/transparent/ser_at_least_one.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(transparent)] 4 | / #[serde(transparent)]
5 | | struct S { 5 | | struct S {
6 | | #[serde(skip)] 6 | | #[serde(skip)]
7 | | a: u8, 7 | | a: u8,
8 | | } 8 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,6 @@
error: #[serde(transparent)] is not allowed on a unit struct error: #[serde(transparent)] is not allowed on a unit struct
--> tests/ui/transparent/unit_struct.rs:4:1 --> tests/ui/transparent/unit_struct.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(transparent)] 4 | / #[serde(transparent)]
5 | | struct S; 5 | | struct S;
| |_________^ | |_________^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,8 @@
error: #[serde(transparent)] is not allowed with #[serde(from = "...")] error: #[serde(transparent)] is not allowed with #[serde(from = "...")]
--> tests/ui/transparent/with_from.rs:4:1 --> tests/ui/transparent/with_from.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(transparent, from = "u64")] 4 | / #[serde(transparent, from = "u64")]
5 | | struct S { 5 | | struct S {
6 | | a: u8, 6 | | a: u8,
7 | | } 7 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,8 @@
error: #[serde(transparent)] is not allowed with #[serde(into = "...")] error: #[serde(transparent)] is not allowed with #[serde(into = "...")]
--> tests/ui/transparent/with_into.rs:4:1 --> tests/ui/transparent/with_into.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(transparent, into = "u64")] 4 | / #[serde(transparent, into = "u64")]
5 | | struct S { 5 | | struct S {
6 | | a: u8, 6 | | a: u8,
7 | | } 7 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,8 @@
error: #[serde(transparent)] is not allowed with #[serde(try_from = "...")] error: #[serde(transparent)] is not allowed with #[serde(try_from = "...")]
--> tests/ui/transparent/with_try_from.rs:4:1 --> tests/ui/transparent/with_try_from.rs:4:1
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | / #[serde(transparent, try_from = "u64")] 4 | / #[serde(transparent, try_from = "u64")]
5 | | struct S { 5 | | struct S {
6 | | a: u8, 6 | | a: u8,
7 | | } 7 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: failed to parse type: from = "Option<T" error: failed to parse type: from = "Option<T"
--> tests/ui/type-attribute/from.rs:4:16 --> tests/ui/type-attribute/from.rs:4:16
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(from = "Option<T")] 4 | #[serde(from = "Option<T")]
| ^^^^^^^^^^ | ^^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: failed to parse type: into = "Option<T" error: failed to parse type: into = "Option<T"
--> tests/ui/type-attribute/into.rs:4:16 --> tests/ui/type-attribute/into.rs:4:16
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(into = "Option<T")] 4 | #[serde(into = "Option<T")]
| ^^^^^^^^^^ | ^^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: failed to parse type: try_from = "Option<T" error: failed to parse type: try_from = "Option<T"
--> tests/ui/type-attribute/try_from.rs:4:20 --> tests/ui/type-attribute/try_from.rs:4:20
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | #[serde(try_from = "Option<T")] 4 | #[serde(try_from = "Option<T")]
| ^^^^^^^^^^ | ^^^^^^^^^^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: unexpected literal in nested attribute, expected ident error: unexpected literal in nested attribute, expected ident
--> tests/ui/unexpected-literal/container.rs:4:9 --> tests/ui/unexpected-literal/container.rs:4:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde("literal")] 4 | #[serde("literal")]
| ^^^^^^^^^ | ^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: unexpected literal in nested attribute, expected ident error: unexpected literal in nested attribute, expected ident
--> tests/ui/unexpected-literal/field.rs:5:13 --> tests/ui/unexpected-literal/field.rs:5:13
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct S {
5 | #[serde("literal")] 5 | #[serde("literal")]
| ^^^^^^^^^ | ^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: unexpected literal in nested attribute, expected ident error: unexpected literal in nested attribute, expected ident
--> tests/ui/unexpected-literal/variant.rs:5:13 --> tests/ui/unexpected-literal/variant.rs:5:13
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum E {
5 | #[serde("literal")] 5 | #[serde("literal")]
| ^^^^^^^^^ | ^^^^^^^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,5 @@
error: unknown serde container attribute `abc` error: unknown serde container attribute `abc`
--> tests/ui/unknown-attribute/container.rs:4:9 --> tests/ui/unknown-attribute/container.rs:4:9
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | #[serde(abc = "xyz")] 4 | #[serde(abc = "xyz")]
| ^^^ | ^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: unknown serde field attribute `abc` error: unknown serde field attribute `abc`
--> tests/ui/unknown-attribute/field.rs:5:13 --> tests/ui/unknown-attribute/field.rs:5:13
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | struct C {
5 | #[serde(abc = "xyz")] 5 | #[serde(abc = "xyz")]
| ^^^ | ^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,10 +1,5 @@
error: unknown serde variant attribute `abc` error: unknown serde variant attribute `abc`
--> tests/ui/unknown-attribute/variant.rs:5:13 --> tests/ui/unknown-attribute/variant.rs:5:13
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum E {
5 | #[serde(abc = "xyz")] 5 | #[serde(abc = "xyz")]
| ^^^ | ^^^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,8 @@
error: Serde does not support derive for unions error: Serde does not support derive for unions
--> tests/ui/unsupported/union_de.rs:4:1 --> tests/ui/unsupported/union_de.rs:4:1
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | / union Union { 4 | / union Union {
5 | | x: u8, 5 | | x: u8,
6 | | y: (), 6 | | y: (),
7 | | } 7 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,8 @@
error: Serde does not support derive for unions error: Serde does not support derive for unions
--> tests/ui/unsupported/union_ser.rs:4:1 --> tests/ui/unsupported/union_ser.rs:4:1
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | / union Union { 4 | / union Union {
5 | | x: u8, 5 | | x: u8,
6 | | y: (), 6 | | y: (),
7 | | } 7 | | }
| |_^ | |_^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: variant `Newtype` cannot have both #[serde(deserialize_with)] and a field #0 marked with #[serde(skip_deserializing)] error: variant `Newtype` cannot have both #[serde(deserialize_with)] and a field #0 marked with #[serde(skip_deserializing)]
--> tests/ui/with-variant/skip_de_newtype_field.rs:5:5 --> tests/ui/with-variant/skip_de_newtype_field.rs:5:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(deserialize_with = "deserialize_some_newtype_variant")] 5 | / #[serde(deserialize_with = "deserialize_some_newtype_variant")]
6 | | Newtype(#[serde(skip_deserializing)] String), 6 | | Newtype(#[serde(skip_deserializing)] String),
| |________________________________________________^ | |________________________________________________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,6 @@
error: variant `Struct` cannot have both #[serde(deserialize_with)] and a field `f1` marked with #[serde(skip_deserializing)] error: variant `Struct` cannot have both #[serde(deserialize_with)] and a field `f1` marked with #[serde(skip_deserializing)]
--> tests/ui/with-variant/skip_de_struct_field.rs:5:5 --> tests/ui/with-variant/skip_de_struct_field.rs:5:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(deserialize_with = "deserialize_some_other_variant")] 5 | / #[serde(deserialize_with = "deserialize_some_other_variant")]
6 | | Struct { 6 | | Struct {
7 | | #[serde(skip_deserializing)] 7 | | #[serde(skip_deserializing)]
@ -11,5 +8,3 @@ error: variant `Struct` cannot have both #[serde(deserialize_with)] and a field
9 | | f2: u8, 9 | | f2: u8,
10 | | }, 10 | | },
| |_____^ | |_____^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: variant `Tuple` cannot have both #[serde(deserialize_with)] and a field #0 marked with #[serde(skip_deserializing)] error: variant `Tuple` cannot have both #[serde(deserialize_with)] and a field #0 marked with #[serde(skip_deserializing)]
--> tests/ui/with-variant/skip_de_tuple_field.rs:5:5 --> tests/ui/with-variant/skip_de_tuple_field.rs:5:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(deserialize_with = "deserialize_some_other_variant")] 5 | / #[serde(deserialize_with = "deserialize_some_other_variant")]
6 | | Tuple(#[serde(skip_deserializing)] String, u8), 6 | | Tuple(#[serde(skip_deserializing)] String, u8),
| |__________________________________________________^ | |__________________________________________________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,7 @@
error: variant `Unit` cannot have both #[serde(deserialize_with)] and #[serde(skip_deserializing)] error: variant `Unit` cannot have both #[serde(deserialize_with)] and #[serde(skip_deserializing)]
--> tests/ui/with-variant/skip_de_whole_variant.rs:5:5 --> tests/ui/with-variant/skip_de_whole_variant.rs:5:5
| |
3 | #[derive(Deserialize)]
| ----------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(deserialize_with = "deserialize_some_unit_variant")] 5 | / #[serde(deserialize_with = "deserialize_some_unit_variant")]
6 | | #[serde(skip_deserializing)] 6 | | #[serde(skip_deserializing)]
7 | | Unit, 7 | | Unit,
| |________^ | |________^
|
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: variant `Newtype` cannot have both #[serde(serialize_with)] and a field #0 marked with #[serde(skip_serializing)] error: variant `Newtype` cannot have both #[serde(serialize_with)] and a field #0 marked with #[serde(skip_serializing)]
--> tests/ui/with-variant/skip_ser_newtype_field.rs:5:5 --> tests/ui/with-variant/skip_ser_newtype_field.rs:5:5
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(serialize_with = "serialize_some_newtype_variant")] 5 | / #[serde(serialize_with = "serialize_some_newtype_variant")]
6 | | Newtype(#[serde(skip_serializing)] String), 6 | | Newtype(#[serde(skip_serializing)] String),
| |______________________________________________^ | |______________________________________________^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: variant `Newtype` cannot have both #[serde(serialize_with)] and a field #0 marked with #[serde(skip_serializing_if)] error: variant `Newtype` cannot have both #[serde(serialize_with)] and a field #0 marked with #[serde(skip_serializing_if)]
--> tests/ui/with-variant/skip_ser_newtype_field_if.rs:5:5 --> tests/ui/with-variant/skip_ser_newtype_field_if.rs:5:5
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(serialize_with = "serialize_some_newtype_variant")] 5 | / #[serde(serialize_with = "serialize_some_newtype_variant")]
6 | | Newtype(#[serde(skip_serializing_if = "always")] String), 6 | | Newtype(#[serde(skip_serializing_if = "always")] String),
| |____________________________________________________________^ | |____________________________________________________________^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,6 @@
error: variant `Struct` cannot have both #[serde(serialize_with)] and a field `f1` marked with #[serde(skip_serializing)] error: variant `Struct` cannot have both #[serde(serialize_with)] and a field `f1` marked with #[serde(skip_serializing)]
--> tests/ui/with-variant/skip_ser_struct_field.rs:5:5 --> tests/ui/with-variant/skip_ser_struct_field.rs:5:5
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(serialize_with = "serialize_some_other_variant")] 5 | / #[serde(serialize_with = "serialize_some_other_variant")]
6 | | Struct { 6 | | Struct {
7 | | #[serde(skip_serializing)] 7 | | #[serde(skip_serializing)]
@ -11,5 +8,3 @@ error: variant `Struct` cannot have both #[serde(serialize_with)] and a field `f
9 | | f2: u8, 9 | | f2: u8,
10 | | }, 10 | | },
| |_____^ | |_____^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,9 +1,6 @@
error: variant `Struct` cannot have both #[serde(serialize_with)] and a field `f1` marked with #[serde(skip_serializing_if)] error: variant `Struct` cannot have both #[serde(serialize_with)] and a field `f1` marked with #[serde(skip_serializing_if)]
--> tests/ui/with-variant/skip_ser_struct_field_if.rs:5:5 --> tests/ui/with-variant/skip_ser_struct_field_if.rs:5:5
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(serialize_with = "serialize_some_newtype_variant")] 5 | / #[serde(serialize_with = "serialize_some_newtype_variant")]
6 | | Struct { 6 | | Struct {
7 | | #[serde(skip_serializing_if = "always")] 7 | | #[serde(skip_serializing_if = "always")]
@ -11,5 +8,3 @@ error: variant `Struct` cannot have both #[serde(serialize_with)] and a field `f
9 | | f2: u8, 9 | | f2: u8,
10 | | }, 10 | | },
| |_____^ | |_____^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: variant `Tuple` cannot have both #[serde(serialize_with)] and a field #0 marked with #[serde(skip_serializing)] error: variant `Tuple` cannot have both #[serde(serialize_with)] and a field #0 marked with #[serde(skip_serializing)]
--> tests/ui/with-variant/skip_ser_tuple_field.rs:5:5 --> tests/ui/with-variant/skip_ser_tuple_field.rs:5:5
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(serialize_with = "serialize_some_other_variant")] 5 | / #[serde(serialize_with = "serialize_some_other_variant")]
6 | | Tuple(#[serde(skip_serializing)] String, u8), 6 | | Tuple(#[serde(skip_serializing)] String, u8),
| |________________________________________________^ | |________________________________________________^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,11 +1,6 @@
error: variant `Tuple` cannot have both #[serde(serialize_with)] and a field #0 marked with #[serde(skip_serializing_if)] error: variant `Tuple` cannot have both #[serde(serialize_with)] and a field #0 marked with #[serde(skip_serializing_if)]
--> tests/ui/with-variant/skip_ser_tuple_field_if.rs:5:5 --> tests/ui/with-variant/skip_ser_tuple_field_if.rs:5:5
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(serialize_with = "serialize_some_other_variant")] 5 | / #[serde(serialize_with = "serialize_some_other_variant")]
6 | | Tuple(#[serde(skip_serializing_if = "always")] String, u8), 6 | | Tuple(#[serde(skip_serializing_if = "always")] String, u8),
| |______________________________________________________________^ | |______________________________________________________________^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,12 +1,7 @@
error: variant `Unit` cannot have both #[serde(serialize_with)] and #[serde(skip_serializing)] error: variant `Unit` cannot have both #[serde(serialize_with)] and #[serde(skip_serializing)]
--> tests/ui/with-variant/skip_ser_whole_variant.rs:5:5 --> tests/ui/with-variant/skip_ser_whole_variant.rs:5:5
| |
3 | #[derive(Serialize)]
| --------- in this derive macro expansion
4 | enum Enum {
5 | / #[serde(serialize_with = "serialize_some_unit_variant")] 5 | / #[serde(serialize_with = "serialize_some_unit_variant")]
6 | | #[serde(skip_serializing)] 6 | | #[serde(skip_serializing)]
7 | | Unit, 7 | | Unit,
| |________^ | |________^
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)