diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc/mir/interpret/allocation.rs index 052603f6e5e6..0d0aa8a232e6 100644 --- a/src/librustc/mir/interpret/allocation.rs +++ b/src/librustc/mir/interpret/allocation.rs @@ -472,7 +472,7 @@ pub fn write_ptr_sized( val: ScalarMaybeUndef, ) -> InterpResult<'tcx> { let ptr_size = cx.data_layout().pointer_size; - self.write_scalar(cx, ptr.into(), val, ptr_size) + self.write_scalar(cx, ptr, val, ptr_size) } } diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index 3086f9b04df6..6a937b87645c 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -1519,7 +1519,7 @@ pub fn fmt_successor_labels(&self) -> Vec> { values .iter() .map(|&u| { - ty::Const::from_scalar(tcx, Scalar::from_uint(u, size).into(), switch_ty) + ty::Const::from_scalar(tcx, Scalar::from_uint(u, size), switch_ty) .to_string() .into() }) diff --git a/src/librustc/mir/tcx.rs b/src/librustc/mir/tcx.rs index e6c7c84494cd..13996a74acb3 100644 --- a/src/librustc/mir/tcx.rs +++ b/src/librustc/mir/tcx.rs @@ -156,7 +156,7 @@ pub fn ty(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx> } Rvalue::AddressOf(mutability, ref place) => { let place_ty = place.ty(local_decls, tcx).ty; - tcx.mk_ptr(ty::TypeAndMut { ty: place_ty, mutbl: mutability.into() }) + tcx.mk_ptr(ty::TypeAndMut { ty: place_ty, mutbl: mutability }) } Rvalue::Len(..) => tcx.types.usize, Rvalue::Cast(.., ty) => ty, diff --git a/src/librustc/traits/mod.rs b/src/librustc/traits/mod.rs index de2ec53e51e7..b05bd26f0482 100644 --- a/src/librustc/traits/mod.rs +++ b/src/librustc/traits/mod.rs @@ -820,8 +820,7 @@ pub fn solution(&self) -> Option<(String, Option<(String, Span)>)> { MethodViolationCode::UndispatchableReceiver, span, ) => ( - format!("consider changing method `{}`'s `self` parameter to be `&self`", name) - .into(), + format!("consider changing method `{}`'s `self` parameter to be `&self`", name), Some(("&Self".to_string(), span)), ), ObjectSafetyViolation::AssocConst(name, _) diff --git a/src/librustc_ast_lowering/expr.rs b/src/librustc_ast_lowering/expr.rs index e2dd55b4cbac..d781fbde59cb 100644 --- a/src/librustc_ast_lowering/expr.rs +++ b/src/librustc_ast_lowering/expr.rs @@ -831,8 +831,7 @@ fn lower_loop_destination(&mut self, destination: Option<(NodeId, Label)>) -> hi .last() .cloned() .map(|id| Ok(self.lower_node_id(id))) - .unwrap_or(Err(hir::LoopIdError::OutsideLoopScope)) - .into(), + .unwrap_or(Err(hir::LoopIdError::OutsideLoopScope)), }; hir::Destination { label: destination.map(|(_, label)| label), target_id } } @@ -841,7 +840,7 @@ fn lower_jump_destination(&mut self, id: NodeId, opt_label: Option