Did it come up as an unused-attribute warning?
On 16 July 2014 21:38, Ilya Dmitrichenko <[email protected]> wrote: > Hi List, > > Using serialize crate, I have made a typo in attribute name and wrote > 'derives' instead of 'deriving' and I got an error message about > `ToJson` trait not being implemented. > > Here is what I did: > > > cat foo.rs > extern crate serialize; > use serialize::json; > > #[derive(Decodable, Encodable)] > pub struct Data { > test: bool, > uuid: int, > time: f64, > } > > fn main() { > let data = Data { test: true, uuid: 123, time: 34349480.24 }; > json::encode(&data); > } > > > rustc foo.rs > foo.rs:13:3: 13:15 error: failed to find an implementation of trait > > serialize::serialize::Encodable<serialize::json::Encoder<'_>,std::io::IoError> > for Data > foo.rs:13 json::encode(&data); > ^~~~~~~~~~~~ > > The compiler happily skipped over unknown attribute... Is this a > desired behaviour or a known issues? > > Cheers, > -- > Ilya > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
