[rust-dev] no error or warning when an unknown attribute is used

"Andrés N. Robalino" andres at andrab.com
Wed Jul 16 07:19:06 PDT 2014


If you comment out json::encode(&data) you'll get the expected warnings.

On 7/16/14, 8:59, Ben Harris wrote:
> You can ask on the Rust IRC. My guess is that the error is triggering 
> before there is a chance to throw the unused-attribute warning out. In 
> the past it would have told you the error, but with the new plugin 
> system we can define our own attributes, so the lint can't tell that 
> we have done something wrong till the end.
>
>
> On 16 July 2014 21:55, Ilya Dmitrichenko <errordeveloper at gmail.com 
> <mailto:errordeveloper at gmail.com>> wrote:
>
>     On 16 July 2014 14:51, Ben Harris <mail at bharr.is
>     <mailto:mail at bharr.is>> wrote:
>     > Did it come up as an unused-attribute warning?
>
>     No, it didn't. This is all the output I got:
>
>     >> > rustc foo.rs <http://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 <http://foo.rs:13>   json::encode(&data);
>     >>                 ^~~~~~~~~~~~
>
>
>
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140716/32c0bf21/attachment.html>


More information about the Rust-dev mailing list