mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-28 00:15:23 +00:00
fix decoding of multiple attributes (fixes #7017)
We were just looking at the last because we were overwriting ret.
This commit is contained in:
parent
59bbbe4335
commit
90ec4228be
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user