Use wide pointers consistenly across the compiler
This commit is contained in:
parent
f7c8928f03
commit
018ba0528f
41 changed files with 120 additions and 120 deletions
|
@ -1105,7 +1105,7 @@ fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: LocalDefId) {
|
|||
// Check that we use types valid for use in the lanes of a SIMD "vector register"
|
||||
// These are scalar types which directly match a "machine" type
|
||||
// Yes: Integers, floats, "thin" pointers
|
||||
// No: char, "fat" pointers, compound types
|
||||
// No: char, "wide" pointers, compound types
|
||||
match element_ty.kind() {
|
||||
ty::Param(_) => (), // pass struct<T>([T; 4]) through, let monomorphization catch errors
|
||||
ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::RawPtr(_, _) => (), // struct([u8; 4]) is ok
|
||||
|
|
|
@ -424,7 +424,7 @@ pub(crate) fn coerce_unsized_info<'tcx>(
|
|||
// Here `U = [i32; 3]` and `V = [i32]`. At runtime,
|
||||
// when this coercion occurs, we would be changing the
|
||||
// field `ptr` from a thin pointer of type `*mut [i32;
|
||||
// 3]` to a fat pointer of type `*mut [i32]` (with
|
||||
// 3]` to a wide pointer of type `*mut [i32]` (with
|
||||
// extra data `3`). **The purpose of this check is to
|
||||
// make sure that we know how to do this conversion.**
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue