Rollup merge of #124957 - compiler-errors:builtin-deref, r=michaelwoerister

Make `Ty::builtin_deref` just return a `Ty`

Nowhere in the compiler are we using the mutability part of the `TyAndMut` that we used to return.
This commit is contained in:
Matthias Krüger 2024-05-10 16:10:47 +02:00 committed by GitHub
commit 9a9ec90567
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 92 additions and 116 deletions

View file

@ -2387,7 +2387,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
let pointee = in_elem.builtin_deref(true).unwrap_or_else(|| {
span_bug!(span, "must be called with a vector of pointer types as first argument")
});
let layout = bx.layout_of(pointee.ty);
let layout = bx.layout_of(pointee);
let ptrs = args[0].immediate();
// The second argument must be a ptr-sized integer.
// (We don't care about the signedness, this is wrapping anyway.)