diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index e8501904c6f..93f3d68c926 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -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 }