diff options
| author | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2024-09-05 00:34:04 +0300 |
|---|---|---|
| committer | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2024-09-06 00:30:36 +0300 |
| commit | f6e8a84eeae8b5f7291999966ab82d495ea7da26 (patch) | |
| tree | 00162219b0b327bcc68bf7fb0909defcebcee501 /compiler/rustc_const_eval/src | |
| parent | 842d6fc32e3d0d26bb11fbe6a2f6ae2afccc06cb (diff) | |
| download | rust-f6e8a84eeae8b5f7291999966ab82d495ea7da26.tar.gz rust-f6e8a84eeae8b5f7291999966ab82d495ea7da26.zip | |
Make `Ty::boxed_ty` return an `Option`
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/call.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs index 82438eb5e78..568a9a3a637 100644 --- a/compiler/rustc_const_eval/src/interpret/call.rs +++ b/compiler/rustc_const_eval/src/interpret/call.rs @@ -189,7 +189,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { ty::Ref(_, ty, _) => *ty, ty::RawPtr(ty, _) => *ty, // We only accept `Box` with the default allocator. - _ if ty.is_box_global(*self.tcx) => ty.boxed_ty(), + _ if ty.is_box_global(*self.tcx) => ty.expect_boxed_ty(), _ => return Ok(None), })) }; |
