mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 04:48:01 +00:00
Update ui tests to 2018 edition
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde_derive::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(tag = "conflict", content = "conflict")]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
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")]
|
||||
6 | | enum E {
|
||||
7 | | A,
|
||||
8 | | B,
|
||||
9 | | }
|
||||
4 | / #[serde(tag = "conflict", content = "conflict")]
|
||||
5 | | enum E {
|
||||
6 | | A,
|
||||
7 | | B,
|
||||
8 | | }
|
||||
| |_^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde_derive::Serialize;
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde_derive::Deserialize;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct Foo {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
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)]
|
||||
7 | | other: Other,
|
||||
5 | / #[serde(flatten, skip_deserializing)]
|
||||
6 | | other: Other,
|
||||
| |________________^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde_derive::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Foo {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
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")]
|
||||
7 | | other: Option<Other>,
|
||||
5 | / #[serde(flatten, skip_serializing_if = "Option::is_none")]
|
||||
6 | | other: Option<Other>,
|
||||
| |________________________^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde_derive::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Foo {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
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)]
|
||||
7 | | other: Other,
|
||||
5 | / #[serde(flatten, skip_serializing)]
|
||||
6 | | other: Other,
|
||||
| |________________^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde_derive::Serialize;
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde_derive::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(tag = "conflict")]
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
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")]
|
||||
6 | | enum E {
|
||||
7 | | A {
|
||||
8 | | #[serde(rename = "conflict")]
|
||||
9 | | x: (),
|
||||
10 | | },
|
||||
11 | | }
|
||||
4 | / #[serde(tag = "conflict")]
|
||||
5 | | enum E {
|
||||
6 | | A {
|
||||
7 | | #[serde(rename = "conflict")]
|
||||
8 | | x: (),
|
||||
9 | | },
|
||||
10 | | }
|
||||
| |_^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Reference in New Issue
Block a user