fn check_adjustments<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>, e: &hir::Expr) {
    match v.tcx.tables.borrow().adjustments.get(&e.id) {
        None | Some(&ty::AdjustReifyFnPointer) | Some(&ty::AdjustUnsafeFnPointer) => {}
        Some(&ty::AdjustDerefRef(ty::AutoDerefRef { autoderefs, .. })) => {
            if (0..autoderefs as u32).any(|autoderef| {
                    v.tcx.is_overloaded_autoderef(e.id, autoderef)
            }) {
                v.add_qualif(ConstQualif::NOT_CONST);
                if v.mode != Mode::Var {
                    span_err!(v.tcx.sess, e.span, E0400,
                              "user-defined dereference operators are not allowed in {}s",
                              v.msg());
                }
            }
        }
    }
}
/// Check the adjustments of an expression
Check the adjustments of an expression
Check the adjustments of an expression
fn check_adjustments<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>, e: &hir::Expr) {
    match v.tcx.tables.borrow().adjustments.get(&e.id) {
        None | Some(&ty::AdjustReifyFnPointer) | Some(&ty::AdjustUnsafeFnPointer) => {}
        Some(&ty::AdjustDerefRef(ty::AutoDerefRef { autoderefs, .. })) => {
            if (0..autoderefs as u32).any(|autoderef| {
                    v.tcx.is_overloaded_autoderef(e.id, autoderef)
            }) {
                v.add_qualif(ConstQualif::NOT_CONST);
                if v.mode != Mode::Var {
                    span_err!(v.tcx.sess, e.span, E0400,
                              "user-defined dereference operators are not allowed in {}s",
                              v.msg());
                }
            }
        }
    }
}
fn check_adjustments < ' a , ' tcx > ( v : & mut CheckCrateVisitor < ' a , ' tcx > , e : & hir :: Expr ) { match v . tcx . tables . borrow ( ) . adjustments . get ( & e . id ) { None | Some ( & ty :: AdjustReifyFnPointer ) | Some ( & ty :: AdjustUnsafeFnPointer ) => { } Some ( & ty :: AdjustDerefRef ( ty :: AutoDerefRef { autoderefs , .. } ) ) => { if ( 0 .. autoderefs as u32 ) . any ( | autoderef | { v . tcx . is_overloaded_autoderef ( e . id , autoderef ) } ) { v . add_qualif ( ConstQualif :: NOT_CONST ) ; if v . mode != Mode :: Var { span_err ! ( v tcx sess e span E0400 " " v msg ( ) ) ; } } } } }
Check the adjustments of an expression
Check the adjustments of an expression
v
&mut CheckCrateVisitor<'a, 'tcx>
e
&hir::Expr
v
&mut CheckCrateVisitor<'a, 'tcx>
e
&hir::Expr