about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/util
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-05-09 22:45:14 -0400
committerMichael Goulet <michael@errs.io>2024-05-09 22:55:00 -0400
commitd50c2b0a52f31fbbf6e6bfa27c129b513fdddb0b (patch)
tree6595467b7154920cfb66630452ad0974979da2db /compiler/rustc_const_eval/src/util
parent8c7c151a7a03d92cc5c75c49aa82a658ec1fe4ff (diff)
downloadrust-d50c2b0a52f31fbbf6e6bfa27c129b513fdddb0b.tar.gz
rust-d50c2b0a52f31fbbf6e6bfa27c129b513fdddb0b.zip
Make builtin_deref just return a Ty
Diffstat (limited to 'compiler/rustc_const_eval/src/util')
-rw-r--r--compiler/rustc_const_eval/src/util/check_validity_requirement.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/util/check_validity_requirement.rs b/compiler/rustc_const_eval/src/util/check_validity_requirement.rs
index 8c4af5e5132..36597507f47 100644
--- a/compiler/rustc_const_eval/src/util/check_validity_requirement.rs
+++ b/compiler/rustc_const_eval/src/util/check_validity_requirement.rs
@@ -115,7 +115,7 @@ fn might_permit_raw_init_lax<'tcx>(
 
     // Special magic check for references and boxes (i.e., special pointer types).
     if let Some(pointee) = this.ty.builtin_deref(false) {
-        let pointee = cx.layout_of(pointee.ty)?;
+        let pointee = cx.layout_of(pointee)?;
         // We need to ensure that the LLVM attributes `aligned` and `dereferenceable(size)` are satisfied.
         if pointee.align.abi.bytes() > 1 {
             // 0x01-filling is not aligned.