Skip to content

Commit 90ec422

Browse files
committed
fix decoding of multiple attributes (fixes #7017)
We were just looking at the last because we were overwriting ret.
1 parent 59bbbe4 commit 90ec422

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4043,7 +4043,7 @@ pub fn has_attr(tcx: ctxt, did: def_id, attr: &str) -> bool {
40434043
} else {
40444044
let mut ret = false;
40454045
do csearch::get_item_attrs(tcx.cstore, did) |meta_items| {
4046-
ret = attr::contains_name(meta_items, attr);
4046+
ret = ret || attr::contains_name(meta_items, attr);
40474047
}
40484048
ret
40494049
}

0 commit comments

Comments
 (0)