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:
David Tolnay 2018-12-29 00:19:24 -05:00
parent e49b6c708b
commit 47e238aa13
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
4 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,8 @@
#[macro_use]
extern crate serde_derive;
use std::collections::HashMap;
#[derive(Serialize)]
struct Foo(#[serde(flatten)] HashMap<String, String>);

View File

@ -1,7 +1,7 @@
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

View File

@ -1,6 +1,8 @@
#[macro_use]
extern crate serde_derive;
use std::collections::HashMap;
#[derive(Serialize)]
struct Foo(u32, #[serde(flatten)] HashMap<String, String>);

View File

@ -1,7 +1,7 @@
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