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

example:
    let s: String = format!("hello").into();
This commit is contained in:
Matthias Krüger 2020-02-25 18:10:34 +01:00
parent 49c68bd53f
commit 7be94a8a95
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)
}