diff --git a/src/consts.rs b/src/consts.rs index 171ba6f27f05..361919934749 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -484,7 +484,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> { if let Some(&PathResolution { base_def: DefConst(id), ..}) = lcx.tcx.def_map.borrow().get(&e.id) { maybe_id = Some(id); } - // separate if lets to avoid doubleborrowing the defmap + // separate if lets to avoid double borrowing the def_map if let Some(id) = maybe_id { if let Some(const_expr) = lookup_const_by_id(lcx.tcx, id, None) { let ret = self.expr(const_expr);