fn binding_mode_map(&mut self, pat: &Pat) -> BindingMap {
        let mut binding_map = FxHashMap::default();

        pat.walk(&mut |pat| {
            match pat.kind {
                PatKind::Ident(binding_mode, ident, ref sub_pat)
                    if sub_pat.is_some() || self.is_base_res_local(pat.id) =>
                {
                    binding_map.insert(ident, BindingInfo { span: ident.span, binding_mode });
                }
                PatKind::Or(ref ps) => {
                    // Check the consistency of this or-pattern and
                    // then add all bindings to the larger map.
                    for bm in self.check_consistent_bindings(ps) {
                        binding_map.extend(bm);
                    }
                    return false;
                }
                _ => {}
            }

            true
        });

        binding_map
    }
/// build a map from pattern identifiers to binding-info's.
/// this is done hygienically. This could arise for a macro
/// that expands into an or-pattern where one 'x' was from the
/// user and one 'x' came from the macro.
build a map from pattern identifiers to binding-info's.
this is done hygienically. This could arise for a macro
that expands into an or-pattern where one 'x' was from the
user and one 'x' came from the macro.
build a map from pattern identifiers to binding - info ' s . this is done hygienically . This could arise for a macro that expands into an or - pattern where one ' x ' was from the user and one ' x ' came from the macro .
fn binding_mode_map(&mut self, pat: &Pat) -> BindingMap {
        let mut binding_map = FxHashMap::default();
        pat.walk(&mut |pat| {
            match pat.kind {
                PatKind::Ident(binding_mode, ident, ref sub_pat)
                    if sub_pat.is_some() || self.is_base_res_local(pat.id) =>
                {
                    binding_map.insert(ident, BindingInfo { span: ident.span, binding_mode });
                }
                PatKind::Or(ref ps) => {
                    // Check the consistency of this or-pattern and
                    // then add all bindings to the larger map.
                    for bm in self.check_consistent_bindings(ps) {
                        binding_map.extend(bm);
                    }
                    return false;
                }
                _ => {}
            }
            true
        });
        binding_map
    }
fn binding_mode_map ( & mut self , pat : & Pat ) -> BindingMap { let mut binding_map = FxHashMap :: default ( ) ; pat . walk ( & mut | pat | { match pat . kind { PatKind :: Ident ( binding_mode , ident , ref sub_pat ) if sub_pat . is_some ( ) || self . is_base_res_local ( pat . id ) => { binding_map . insert ( ident , BindingInfo { span : ident . span , binding_mode } ) ; } PatKind :: Or ( ref ps ) => { // Check the consistency of this or-pattern and // then add all bindings to the larger map. for bm in self . check_consistent_bindings ( ps ) { binding_map . extend ( bm ) ; } return false ; } _ => { } } true } ) ; binding_map }
build a map from pattern identifiers to binding-info's.
build a map from pattern identifiers to binding - info ' s .
&mut self
pat
&Pat
&mut self
pat
&Pat