initial revert
This commit is contained in:
parent
b0ec3e09a9
commit
71bbb603f4
127 changed files with 540 additions and 1050 deletions
|
@ -288,7 +288,6 @@ pub struct Body<'tcx> {
|
|||
|
||||
impl<'tcx> Body<'tcx> {
|
||||
pub fn new(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
source: MirSource<'tcx>,
|
||||
basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
|
||||
source_scopes: IndexVec<SourceScope, SourceScopeData<'tcx>>,
|
||||
|
@ -331,7 +330,7 @@ impl<'tcx> Body<'tcx> {
|
|||
predecessor_cache: PredecessorCache::new(),
|
||||
is_cyclic: GraphIsCyclicCache::new(),
|
||||
};
|
||||
body.is_polymorphic = body.definitely_has_param_types_or_consts(tcx);
|
||||
body.is_polymorphic = body.has_param_types_or_consts();
|
||||
body
|
||||
}
|
||||
|
||||
|
@ -341,7 +340,7 @@ impl<'tcx> Body<'tcx> {
|
|||
/// is only useful for testing but cannot be `#[cfg(test)]` because it is used in a different
|
||||
/// crate.
|
||||
pub fn new_cfg_only(basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>) -> Self {
|
||||
Body {
|
||||
let mut body = Body {
|
||||
phase: MirPhase::Build,
|
||||
source: MirSource::item(DefId::local(CRATE_DEF_INDEX)),
|
||||
basic_blocks,
|
||||
|
@ -357,7 +356,9 @@ impl<'tcx> Body<'tcx> {
|
|||
is_polymorphic: false,
|
||||
predecessor_cache: PredecessorCache::new(),
|
||||
is_cyclic: GraphIsCyclicCache::new(),
|
||||
}
|
||||
};
|
||||
body.is_polymorphic = body.has_param_types_or_consts();
|
||||
body
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue