File tree 1 file changed +3
-8
lines changed
compiler/rustc_middle/src/mir
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -294,11 +294,8 @@ impl<'tcx> Body<'tcx> {
294
294
/// The returned MIR contains no `LocalDecl`s (even for the return place) or source scopes. It
295
295
/// is only useful for testing but cannot be `#[cfg(test)]` because it is used in a different
296
296
/// crate.
297
- pub fn new_cfg_only (
298
- tcx : TyCtxt < ' tcx > ,
299
- basic_blocks : IndexVec < BasicBlock , BasicBlockData < ' tcx > > ,
300
- ) -> Self {
301
- let mut body = Body {
297
+ pub fn new_cfg_only ( basic_blocks : IndexVec < BasicBlock , BasicBlockData < ' tcx > > ) -> Self {
298
+ Body {
302
299
phase : MirPhase :: Build ,
303
300
source : MirSource :: item ( DefId :: local ( CRATE_DEF_INDEX ) ) ,
304
301
basic_blocks,
@@ -314,9 +311,7 @@ impl<'tcx> Body<'tcx> {
314
311
is_polymorphic : false ,
315
312
predecessor_cache : PredecessorCache :: new ( ) ,
316
313
is_cyclic : GraphIsCyclicCache :: new ( ) ,
317
- } ;
318
- body. is_polymorphic = body. has_param_types_or_consts ( tcx) ;
319
- body
314
+ }
320
315
}
321
316
322
317
#[ inline]
You can’t perform that action at this time.
0 commit comments