don't use .into() to convert types into identical types.
example:
let s: String = format!("hello").into();
This commit is contained in:
parent
49c68bd53f
commit
7be94a8a95
32 changed files with 42 additions and 62 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue