Rollup merge of #100095 - jackh726:early-binder, r=lcnr
More EarlyBinder cleanups Each commit is independent r? types
This commit is contained in:
commit
01ccde5ec8
14 changed files with 94 additions and 68 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue