diff options
| author | bors <bors@rust-lang.org> | 2021-05-15 12:41:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-15 12:41:28 +0000 |
| commit | 2a245f40a19c9a60b3be33c959eb5cfb0ad163c6 (patch) | |
| tree | 6a8fc519df8fdd71054f89c108b98be09ba66f37 /compiler/rustc_mir/src/transform/coverage/query.rs | |
| parent | b439be03c9c30d173c45785a03a03cba98af5ab6 (diff) | |
| parent | 46bc5526db95b03e5b21901e428a5a41d76a1b62 (diff) | |
| download | rust-2a245f40a19c9a60b3be33c959eb5cfb0ad163c6.tar.gz rust-2a245f40a19c9a60b3be33c959eb5cfb0ad163c6.zip | |
Auto merge of #85328 - GuillaumeGomez:rollup-exe9nbj, r=GuillaumeGomez
Rollup of 12 pull requests Successful merges: - #84461 (rustdoc: Remove unnecessary `StripItem` wrapper) - #85067 (Minimize amount of fake `DefId`s used in rustdoc) - #85207 (Fix typo in comment) - #85215 (coverage bug fixes and some refactoring) - #85221 (dbg macro: Discuss use in tests, and slightly clarify) - #85246 (Miner code formatting) - #85253 (swap function order for better read flow) - #85256 (Fix display for "implementors" section) - #85268 (Use my real name) - #85278 (Improve match statements) - #85289 (Fix toggle position on mobile) - #85323 (Fix eslint errors) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/query.rs')
| -rw-r--r-- | compiler/rustc_mir/src/transform/coverage/query.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir/src/transform/coverage/query.rs b/compiler/rustc_mir/src/transform/coverage/query.rs index 2ba9d1bdc0c..760f16eae6b 100644 --- a/compiler/rustc_mir/src/transform/coverage/query.rs +++ b/compiler/rustc_mir/src/transform/coverage/query.rs @@ -120,8 +120,8 @@ impl CoverageVisitor { } } -fn coverageinfo<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> CoverageInfo { - let mir_body = mir_body(tcx, def_id); +fn coverageinfo<'tcx>(tcx: TyCtxt<'tcx>, instance_def: ty::InstanceDef<'tcx>) -> CoverageInfo { + let mir_body = tcx.instance_mir(instance_def); let mut coverage_visitor = CoverageVisitor { // num_counters always has at least the `ZERO` counter. |
