pub fn is_static(&self, def_id: DefId) -> Option<hir::Mutability> {
        if let Some(node) = self.hir.get_if_local(def_id) {
            match node {
                Node::NodeItem(&hir::Item {
                    node: hir::ItemKind::Static(_, mutbl, _), ..
                }) => Some(mutbl),
                Node::NodeForeignItem(&hir::ForeignItem {
                    node: hir::ForeignItemKind::Static(_, is_mutbl), ..
                }) =>
                    Some(if is_mutbl {
                        hir::Mutability::MutMutable
                    } else {
                        hir::Mutability::MutImmutable
                    }),
                _ => None
            }
        } else {
            match self.describe_def(def_id) {
                Some(Def::Static(_, is_mutbl)) =>
                    Some(if is_mutbl {
                        hir::Mutability::MutMutable
                    } else {
                        hir::Mutability::MutImmutable
                    }),
                _ => None
            }
        }
    }
/// Return whether the node pointed to by def_id is a static item, and its mutability
Return whether the node pointed to by def_id is a static item, and its mutability
Return whether the node pointed to by def_id is a static item and its mutability
pub fn is_static(&self, def_id: DefId) -> Option<hir::Mutability> {
        if let Some(node) = self.hir.get_if_local(def_id) {
            match node {
                Node::NodeItem(&hir::Item {
                    node: hir::ItemKind::Static(_, mutbl, _), ..
                }) => Some(mutbl),
                Node::NodeForeignItem(&hir::ForeignItem {
                    node: hir::ForeignItemKind::Static(_, is_mutbl), ..
                }) =>
                    Some(if is_mutbl {
                        hir::Mutability::MutMutable
                    } else {
                        hir::Mutability::MutImmutable
                    }),
                _ => None
            }
        } else {
            match self.describe_def(def_id) {
                Some(Def::Static(_, is_mutbl)) =>
                    Some(if is_mutbl {
                        hir::Mutability::MutMutable
                    } else {
                        hir::Mutability::MutImmutable
                    }),
                _ => None
            }
        }
    }
pub fn is_static ( & self , def_id : DefId ) -> Option < hir :: Mutability > { if let Some ( node ) = self . hir . get_if_local ( def_id ) { match node { Node :: NodeItem ( & hir :: Item { node : hir :: ItemKind :: Static ( _ , mutbl , _ ) , .. } ) => Some ( mutbl ) , Node :: NodeForeignItem ( & hir :: ForeignItem { node : hir :: ForeignItemKind :: Static ( _ , is_mutbl ) , .. } ) => Some ( if is_mutbl { hir :: Mutability :: MutMutable } else { hir :: Mutability :: MutImmutable } ) , _ => None } } else { match self . describe_def ( def_id ) { Some ( Def :: Static ( _ , is_mutbl ) ) => Some ( if is_mutbl { hir :: Mutability :: MutMutable } else { hir :: Mutability :: MutImmutable } ) , _ => None } } }
Return whether the node pointed to by def_id is a static item, and its mutability
Return whether the node pointed to by def_id is a static item and its mutability
&self
def_id
DefId