Enable rustc_pass_by_value for Span
This commit is contained in:
parent
22c3a71de1
commit
76b13c9eea
8 changed files with 28 additions and 22 deletions
|
@ -671,7 +671,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
// a Coverage code region can be generated, `continue` needs no `Assign`; but
|
||||
// without one, the `InstrumentCoverage` MIR pass cannot generate a code region for
|
||||
// `continue`. Coverage will be missing unless we add a dummy `Assign` to MIR.
|
||||
self.add_dummy_assignment(&span, block, source_info);
|
||||
self.add_dummy_assignment(span, block, source_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -730,8 +730,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
|
||||
// Add a dummy `Assign` statement to the CFG, with the span for the source code's `continue`
|
||||
// statement.
|
||||
fn add_dummy_assignment(&mut self, span: &Span, block: BasicBlock, source_info: SourceInfo) {
|
||||
let local_decl = LocalDecl::new(self.tcx.mk_unit(), *span).internal();
|
||||
fn add_dummy_assignment(&mut self, span: Span, block: BasicBlock, source_info: SourceInfo) {
|
||||
let local_decl = LocalDecl::new(self.tcx.mk_unit(), span).internal();
|
||||
let temp_place = Place::from(self.local_decls.push(local_decl));
|
||||
self.cfg.push_assign_unit(block, source_info, temp_place, self.tcx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue