make Size::from* methods generic in the integer type they accept

This commit is contained in:
Ralf Jung 2020-03-22 17:48:11 +01:00
parent f16b491015
commit 0bc108a13b
9 changed files with 22 additions and 26 deletions

View file

@ -91,7 +91,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),
Size::from_bytes(start),
));
let a_llval = bx.scalar_to_backend(
a,