Add explanation of ignored errors in attr.rs

This commit is contained in:
David Tolnay 2016-06-16 23:25:46 -07:00
parent ac69524258
commit 5f84e601b6
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -15,6 +15,14 @@ use aster::ident::ToIdent;
use error::Error;
// This module handles parsing of `#[serde(...)]` attributes. The entrypoints
// are `ContainerAttrs::from_item`, `VariantAttrs::from_variant`, and
// `FieldAttrs::from_field`. Each returns an instance of the corresponding
// struct. Note that none of them return a Result. Unrecognized, malformed, or
// duplicated attributes result in a span_err but otherwise are ignored. The
// user will see errors simultaneously for all bad attributes in the crate
// rather than just the first.
struct Attr<'a, 'b: 'a, T> {
cx: &'a ExtCtxt<'b>,
name: &'static str,