is_polymorphic doesn't matter for tests
This commit is contained in:
parent
5ba8f4d258
commit
283e0e670b
1 changed files with 3 additions and 8 deletions
|
@ -294,11 +294,8 @@ impl<'tcx> Body<'tcx> {
|
|||
/// The returned MIR contains no `LocalDecl`s (even for the return place) or source scopes. It
|
||||
/// is only useful for testing but cannot be `#[cfg(test)]` because it is used in a different
|
||||
/// crate.
|
||||
pub fn new_cfg_only(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
|
||||
) -> Self {
|
||||
let mut body = Body {
|
||||
pub fn new_cfg_only(basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>) -> Self {
|
||||
Body {
|
||||
phase: MirPhase::Build,
|
||||
source: MirSource::item(DefId::local(CRATE_DEF_INDEX)),
|
||||
basic_blocks,
|
||||
|
@ -314,9 +311,7 @@ impl<'tcx> Body<'tcx> {
|
|||
is_polymorphic: false,
|
||||
predecessor_cache: PredecessorCache::new(),
|
||||
is_cyclic: GraphIsCyclicCache::new(),
|
||||
};
|
||||
body.is_polymorphic = body.has_param_types_or_consts(tcx);
|
||||
body
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue