Closed
Description
Cargo.toml
:
[package]
name = "serde-fail"
version = "0.1.0"
authors = ["Alexander Bulaev <alexbool@yandex-team.ru>"]
[dependencies]
serde = { version = "*", optional = true }
serde_derive = { version = "*", optional = true }
[features]
serialize = ["serde", "serde_derive"]
src/lib.rs
:
#![cfg_attr(feature = "serialize", feature(rustc_macro))]
#[cfg(feature = "serialize")]
extern crate serde;
#[cfg_attr(feature = "serialize", macro_use)]
#[cfg(feature = "serialize")]
extern crate serde_derive;
#[derive(Copy, Clone)]
#[cfg_attr(feature = "serialize", derive(Serialize, Deserialize))]
pub struct MyStruct {
value: i64,
}
alexbool@alexbool-osx ~/D/I/serde-fail> cargo build --features "serialize"
Compiling serde-fail v0.1.0 (file:///Users/alexbool/Documents/IdeaProjects/serde-fail)
error: internal implementation detail (see issue #29642)
--> src/lib.rs:11:1
|
11 | pub struct MyStruct {
| ^
|
= help: add #![feature(rustc_attrs)] to the crate attributes to enable
error: aborting due to previous error
error: Could not compile `serde-fail`.
To learn more, run the command again with --verbose.
Meta:
alexbool@alexbool-osx ~/D/I/serde-fail> rustc -vV
rustc 1.14.0-nightly (3210fd5c2 2016-10-05)
binary: rustc
commit-hash: 3210fd5c20ffc6da420eb00e60bdc8704577fd3b
commit-date: 2016-10-05
host: x86_64-apple-darwin
release: 1.14.0-nightly