fix decoding of multiple attributes (fixes #7017)

We were just looking at the last because we were overwriting ret.
This commit is contained in:
Bill Myers 2013-06-08 22:36:33 +02:00
parent 59bbbe4335
commit 90ec4228be

View File

@ -4043,7 +4043,7 @@ pub fn has_attr(tcx: ctxt, did: def_id, attr: &str) -> bool {
} else {
let mut ret = false;
do csearch::get_item_attrs(tcx.cstore, did) |meta_items| {
ret = attr::contains_name(meta_items, attr);
ret = ret || attr::contains_name(meta_items, attr);
}
ret
}