diff options
| author | Michael Goulet <michael@errs.io> | 2022-08-29 03:24:30 +0000 |
|---|---|---|
| committer | Eric Holk <ericholk@microsoft.com> | 2022-09-12 16:55:59 -0700 |
| commit | 12ec2f0e34e230a5d95d7ef06c6de92efcdcbedf (patch) | |
| tree | 9473b38dfac7be6716b52e839d3182dacf72cb04 /compiler/rustc_middle | |
| parent | 12353c11ca2848c15511d3b3d400fca412daff7b (diff) | |
| download | rust-12ec2f0e34e230a5d95d7ef06c6de92efcdcbedf.tar.gz rust-12ec2f0e34e230a5d95d7ef06c6de92efcdcbedf.zip | |
Construct dyn* during const interp
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/ty/layout.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index 240bead5494..c0d21250c30 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -2545,15 +2545,9 @@ where } } - // dyn* + // dyn* (both fields are usize-sized) ty::Dynamic(_, _, TraitObjectRepresentation::Sized) => { - TyMaybeWithLayout::TyAndLayout( - tcx.layout_of( - ty::ParamEnv::reveal_all() - .and(tcx.mk_tup([tcx.types.usize, tcx.types.usize].into_iter())), - ) - .unwrap(), - ) + TyMaybeWithLayout::Ty(tcx.types.usize) } ty::Projection(_) |
