pub fn maybe_lint_level_root_bounded(self, mut id: HirId, bound: HirId) -> HirId {
        let hir = self.hir();
        loop {
            if id == bound {
                return bound;
            }

            if hir.attrs(id).iter().any(|attr| Level::from_symbol(attr.name_or_empty()).is_some()) {
                return id;
            }
            let next = hir.get_parent_node(id);
            if next == id {
                bug!("lint traversal reached the root of the crate");
            }
            id = next;
        }
    }
/// Walks upwards from `id` to find a node which might change lint levels with attributes.
/// It stops at `bound` and just returns it if reached.
Walks upwards from `id` to find a node which might change lint levels with attributes.
It stops at `bound` and just returns it if reached.
Walks upwards from ` id ` to find a node which might change lint levels with attributes . It stops at ` bound ` and just returns it if reached .
pub fn maybe_lint_level_root_bounded(self, mut id: HirId, bound: HirId) -> HirId {
        let hir = self.hir();
        loop {
            if id == bound {
                return bound;
            }
            if hir.attrs(id).iter().any(|attr| Level::from_symbol(attr.name_or_empty()).is_some()) {
                return id;
            }
            let next = hir.get_parent_node(id);
            if next == id {
                bug!("lint traversal reached the root of the crate");
            }
            id = next;
        }
    }
pub fn maybe_lint_level_root_bounded ( self , mut id : HirId , bound : HirId ) -> HirId { let hir = self . hir ( ) ; loop { if id == bound { return bound ; } if hir . attrs ( id ) . iter ( ) . any ( | attr | Level :: from_symbol ( attr . name_or_empty ( ) ) . is_some ( ) ) { return id ; } let next = hir . get_parent_node ( id ) ; if next == id { bug ! ( " " ) ; } id = next ; } }
Walks upwards from `id` to find a node which might change lint levels with attributes.
Walks upwards from ` id ` to find a node which might change lint levels with attributes .
self
id
HirId
bound
HirId
self
id
HirId
bound
HirId