pub fn pat_contains_ref_binding(pat: &hir::Pat) -> Option<hir::Mutability> {
    let mut result = None;
    pat_bindings(pat, |mode, _, _, _| {
        if let hir::BindingMode::BindByRef(m) = mode {
            // Pick Mutable as maximum
            match result {
                None | Some(hir::MutImmutable) => result = Some(m),
                _ => (),
            }
        }
    });
    result
}
/// Checks if the pattern contains any `ref` or `ref mut` bindings,
/// and if yes whether its containing mutable ones or just immutables ones.
Checks if the pattern contains any `ref` or `ref mut` bindings,
and if yes whether its containing mutable ones or just immutables ones.
Checks if the pattern contains any ` ref ` or ` ref mut ` bindings and if yes whether its containing mutable ones or just immutables ones .
pub fn pat_contains_ref_binding(pat: &hir::Pat) -> Option<hir::Mutability> {
    let mut result = None;
    pat_bindings(pat, |mode, _, _, _| {
        if let hir::BindingMode::BindByRef(m) = mode {
            // Pick Mutable as maximum
            match result {
                None | Some(hir::MutImmutable) => result = Some(m),
                _ => (),
            }
        }
    });
    result
}
pub fn pat_contains_ref_binding ( pat : & hir :: Pat ) -> Option < hir :: Mutability > { let mut result = None ; pat_bindings ( pat , | mode , _ , _ , _ | { if let hir :: BindingMode :: BindByRef ( m ) = mode { // Pick Mutable as maximum match result { None | Some ( hir :: MutImmutable ) => result = Some ( m ) , _ => ( ) , } } } ) ; result }
Checks if the pattern contains any `ref` or `ref mut` bindings,
and if yes whether its containing mutable ones or just immutables ones.
Checks if the pattern contains any ` ref ` or ` ref mut ` bindings and if yes whether its containing mutable ones or just immutables ones .
pat
&hir::Pat
pat
&hir::Pat