fn check_consistent_bindings(&mut self, arm: &Arm) {
        if arm.pats.is_empty() {
            return;
        }
        let map_0 = self.binding_mode_map(&arm.pats[0]);
        for (i, p) in arm.pats.iter().enumerate() {
            let map_i = self.binding_mode_map(&p);

            for (&key, &binding_0) in &map_0 {
                match map_i.get(&key) {
                    None => {
                        let error = ResolutionError::VariableNotBoundInPattern(key.name, 1, i + 1);
                        resolve_error(self, p.span, error);
                    }
                    Some(binding_i) => {
                        if binding_0.binding_mode != binding_i.binding_mode {
                            resolve_error(self,
                                          binding_i.span,
                                          ResolutionError::VariableBoundWithDifferentMode(key.name,
                                                                                          i + 1));
                        }
                    }
                }
            }

            for (&key, &binding) in &map_i {
                if !map_0.contains_key(&key) {
                    resolve_error(self,
                                  binding.span,
                                  ResolutionError::VariableNotBoundInPattern(key.name, i + 1, 1));
                }
            }
        }
    }
// check that all of the arms in an or-pattern have exactly the
// same set of bindings, with the same binding modes for each.
check that all of the arms in an or-pattern have exactly the
same set of bindings, with the same binding modes for each.
check that all of the arms in an or - pattern have exactly the same set of bindings with the same binding modes for each .
fn check_consistent_bindings(&mut self, arm: &Arm) {
        if arm.pats.is_empty() {
            return;
        }
        let map_0 = self.binding_mode_map(&arm.pats[0]);
        for (i, p) in arm.pats.iter().enumerate() {
            let map_i = self.binding_mode_map(&p);
            for (&key, &binding_0) in &map_0 {
                match map_i.get(&key) {
                    None => {
                        let error = ResolutionError::VariableNotBoundInPattern(key.name, 1, i + 1);
                        resolve_error(self, p.span, error);
                    }
                    Some(binding_i) => {
                        if binding_0.binding_mode != binding_i.binding_mode {
                            resolve_error(self,
                                          binding_i.span,
                                          ResolutionError::VariableBoundWithDifferentMode(key.name,
                                                                                          i + 1));
                        }
                    }
                }
            }
            for (&key, &binding) in &map_i {
                if !map_0.contains_key(&key) {
                    resolve_error(self,
                                  binding.span,
                                  ResolutionError::VariableNotBoundInPattern(key.name, i + 1, 1));
                }
            }
        }
    }
fn check_consistent_bindings ( & mut self , arm : & Arm ) { if arm . pats . is_empty ( ) { return ; } let map_0 = self . binding_mode_map ( & arm . pats [ 0 ] ) ; for ( i , p ) in arm . pats . iter ( ) . enumerate ( ) { let map_i = self . binding_mode_map ( & p ) ; for ( & key , & binding_0 ) in & map_0 { match map_i . get ( & key ) { None => { let error = ResolutionError :: VariableNotBoundInPattern ( key . name , 1 , i + 1 ) ; resolve_error ( self , p . span , error ) ; } Some ( binding_i ) => { if binding_0 . binding_mode != binding_i . binding_mode { resolve_error ( self , binding_i . span , ResolutionError :: VariableBoundWithDifferentMode ( key . name , i + 1 ) ) ; } } } } for ( & key , & binding ) in & map_i { if ! map_0 . contains_key ( & key ) { resolve_error ( self , binding . span , ResolutionError :: VariableNotBoundInPattern ( key . name , i + 1 , 1 ) ) ; } } } }
check that all of the arms in an or-pattern have exactly the
same set of bindings, with the same binding modes for each.
check that all of the arms in an or - pattern have exactly the same set of bindings with the same binding modes for each .
&mut self
arm
&Arm
&mut self
arm
&Arm