mirror of
https://github.com/serde-rs/serde.git
synced 2025-10-02 07:21:12 +00:00
Add missing imports in ui tests
There is a new fallback as of nightly-2018-12-29 that makes these emit a new error unrelated to Serde.
This commit is contained in:
parent
e49b6c708b
commit
47e238aa13
@ -1,6 +1,8 @@
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate serde_derive;
|
extern crate serde_derive;
|
||||||
|
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
struct Foo(#[serde(flatten)] HashMap<String, String>);
|
struct Foo(#[serde(flatten)] HashMap<String, String>);
|
||||||
|
|
||||||
|
@ -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:5:12
|
--> $DIR/flatten-newtype-struct.rs:7:12
|
||||||
|
|
|
|
||||||
5 | struct Foo(#[serde(flatten)] HashMap<String, String>);
|
7 | struct Foo(#[serde(flatten)] HashMap<String, String>);
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate serde_derive;
|
extern crate serde_derive;
|
||||||
|
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
struct Foo(u32, #[serde(flatten)] HashMap<String, String>);
|
struct Foo(u32, #[serde(flatten)] HashMap<String, String>);
|
||||||
|
|
||||||
|
@ -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:5:17
|
--> $DIR/flatten-tuple-struct.rs:7:17
|
||||||
|
|
|
|
||||||
5 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>);
|
7 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>);
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user