pub fn has_attr(tcx: ctxt, did: DefId, attr: &str) -> bool {
    let mut found = false;
    each_attr(tcx, did, |item| {
        if attr == item.name() {
            found = true;
            false
        } else {
            true
        }
    });
    return found;
}
/// Determine whether an item is annotated with an attribute
Determine whether an item is annotated with an attribute
Determine whether an item is annotated with an attribute
pub fn has_attr(tcx: ctxt, did: DefId, attr: &str) -> bool {
    let mut found = false;
    each_attr(tcx, did, |item| {
        if attr == item.name() {
            found = true;
            false
        } else {
            true
        }
    });
    return found;
}
pub fn has_attr ( tcx : ctxt , did : DefId , attr : & str ) -> bool { let mut found = false ; each_attr ( tcx , did , | item | { if attr == item . name ( ) { found = true ; false } else { true } } ) ; return found ; }
Determine whether an item is annotated with an attribute
Determine whether an item is annotated with an attribute
tcx
ctxt
did
DefId
attr
&str
tcx
ctxt
did
DefId
attr
&str