mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
is_polymorphic doesn't matter for tests
This commit is contained in:
parent
5ba8f4d258
commit
283e0e670b
@ -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…
Reference in New Issue
Block a user