Closed
Description
// crate must be on rust 2018
// OR add an `extern crate serde_derive`
use serde_derive::Deserialize;
#[derive(Deserialize)]
#[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)]
enum Foo {
A(u8)
}
This is the code you are supposed to use according to the macro_use_extern_crate
lint.
It fails to compile, with
Compiling t v0.1.0 (file:///home/manishearth/sand/bar/t)
error: cannot find attribute macro `serde` in this scope=========> ] 9/10: t
--> src/main.rs:11:3
|
11 | #[serde(deny_unknown_fields)]
| ^^^^^
It compiles fine if you use just one of the two attributes. Swapping attribute order makes it complain about the last non-derive attribute.
This seems broken?