Skip to content
Myr

Add missing imports in ui tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

There is a new fallback as of nightly-2018-12-29 that makes these emit a new error unrelated to Serde.

authored by David Tolnay · committed by David Tolnay · parent e49b6c7 · Browse files · 4 files+8 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+8 added−4 removed

  • tests:+8 added−4 removed

4 files+8 added−4 removed

modified:test_suite/tests/ui/conflict/flatten-newtype-struct.rs+2 added
1#[macro_use]2extern crate serde_derive;34use std::collections::HashMap;56#[derive(Serialize)]7struct Foo(#[serde(flatten)] HashMap<String, String>);89fn main() {}
modified:test_suite/tests/ui/conflict/flatten-newtype-struct.stderr+2 added-2 removed
1error: #[serde(flatten)] cannot be used on newtype structs2 --> $DIR/flatten-newtype-struct.rs:5:122 --> $DIR/flatten-newtype-struct.rs:7:123 |45 | struct Foo(#[serde(flatten)] HashMap<String, String>);47 | struct Foo(#[serde(flatten)] HashMap<String, String>);5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^67error: aborting due to previous error8
modified:test_suite/tests/ui/conflict/flatten-tuple-struct.rs+2 added
1#[macro_use]2extern crate serde_derive;34use std::collections::HashMap;56#[derive(Serialize)]7struct Foo(u32, #[serde(flatten)] HashMap<String, String>);89fn main() {}
modified:test_suite/tests/ui/conflict/flatten-tuple-struct.stderr+2 added-2 removed
1error: #[serde(flatten)] cannot be used on tuple structs2 --> $DIR/flatten-tuple-struct.rs:5:172 --> $DIR/flatten-tuple-struct.rs:7:173 |45 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>);47 | struct Foo(u32, #[serde(flatten)] HashMap<String, String>);5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^67error: aborting due to previous error8