Rollup merge of #69529 - matthiaskrgr:clippy_identity_conversion, r=Mark-Simulacrum

don't use .into() to convert types into identical types.

This removes redundant `.into()` calls.

example: `let s: String = format!("hello").into();`
This commit is contained in:
Dylan DPC 2020-02-28 01:55:49 +01:00 committed by GitHub
commit 02b96b3ecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 42 additions and 62 deletions

View file

@ -92,8 +92,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
let a = Scalar::from(Pointer::new(
bx.tcx().alloc_map.lock().create_memory_alloc(data),
Size::from_bytes(start as u64),
))
.into();
));
let a_llval = bx.scalar_to_backend(
a,
a_scalar,

View file

@ -387,7 +387,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
mir::Rvalue::AddressOf(mutability, ref place) => {
let mk_ptr = move |tcx: TyCtxt<'tcx>, ty: Ty<'tcx>| {
tcx.mk_ptr(ty::TypeAndMut { ty, mutbl: mutability.into() })
tcx.mk_ptr(ty::TypeAndMut { ty, mutbl: mutability })
};
self.codegen_place_to_pointer(bx, place, mk_ptr)
}