diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-08-04 22:25:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-04 22:25:04 +0200 |
| commit | 01ccde5ec8059716a378db5f6e5c879159df3411 (patch) | |
| tree | 6404108f0f1adb69f59d995e2fea3d61504349ab /compiler/rustc_mir_transform | |
| parent | 6b938c8491bc8d16a9a1a4d080368485f4454d31 (diff) | |
| parent | 955fcad75808a66576f72680fa9698753d975ed2 (diff) | |
| download | rust-01ccde5ec8059716a378db5f6e5c879159df3411.tar.gz rust-01ccde5ec8059716a378db5f6e5c879159df3411.zip | |
Rollup merge of #100095 - jackh726:early-binder, r=lcnr
More EarlyBinder cleanups Each commit is independent r? types
Diffstat (limited to 'compiler/rustc_mir_transform')
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/const_prop_lint.rs | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_mir_transform/src/const_prop.rs b/compiler/rustc_mir_transform/src/const_prop.rs index 85ad6b8f2fe..fbc0a767f07 100644 --- a/compiler/rustc_mir_transform/src/const_prop.rs +++ b/compiler/rustc_mir_transform/src/const_prop.rs @@ -18,9 +18,7 @@ use rustc_middle::mir::{ }; use rustc_middle::ty::layout::{LayoutError, LayoutOf, LayoutOfHelpers, TyAndLayout}; use rustc_middle::ty::subst::{InternalSubsts, Subst}; -use rustc_middle::ty::{ - self, ConstKind, EarlyBinder, Instance, ParamEnv, Ty, TyCtxt, TypeVisitable, -}; +use rustc_middle::ty::{self, ConstKind, Instance, ParamEnv, Ty, TyCtxt, TypeVisitable}; use rustc_span::{def_id::DefId, Span}; use rustc_target::abi::{self, HasDataLayout, Size, TargetDataLayout}; use rustc_target::spec::abi::Abi as CallAbi; @@ -387,7 +385,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { ); let ret_layout = ecx - .layout_of(EarlyBinder(body.return_ty()).subst(tcx, substs)) + .layout_of(body.bound_return_ty().subst(tcx, substs)) .ok() // Don't bother allocating memory for large values. // I don't know how return types can seem to be unsized but this happens in the diff --git a/compiler/rustc_mir_transform/src/const_prop_lint.rs b/compiler/rustc_mir_transform/src/const_prop_lint.rs index 3ae6a88a140..c2ea55af48a 100644 --- a/compiler/rustc_mir_transform/src/const_prop_lint.rs +++ b/compiler/rustc_mir_transform/src/const_prop_lint.rs @@ -23,8 +23,7 @@ use rustc_middle::mir::{ use rustc_middle::ty::layout::{LayoutError, LayoutOf, LayoutOfHelpers, TyAndLayout}; use rustc_middle::ty::subst::{InternalSubsts, Subst}; use rustc_middle::ty::{ - self, ConstInt, ConstKind, EarlyBinder, Instance, ParamEnv, ScalarInt, Ty, TyCtxt, - TypeVisitable, + self, ConstInt, ConstKind, Instance, ParamEnv, ScalarInt, Ty, TyCtxt, TypeVisitable, }; use rustc_session::lint; use rustc_span::Span; @@ -196,7 +195,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> { ); let ret_layout = ecx - .layout_of(EarlyBinder(body.return_ty()).subst(tcx, substs)) + .layout_of(body.bound_return_ty().subst(tcx, substs)) .ok() // Don't bother allocating memory for large values. // I don't know how return types can seem to be unsized but this happens in the |
