Skip to content

Commit

Permalink
Rollup merge of rust-lang#76523 - tmiasko:non-use-context-coverage, r…
Browse files Browse the repository at this point in the history
…=wesleywiser

Remove unused PlaceContext::NonUse(NonUseContext::Coverage)

r? @richkadel / @wesleywiser
  • Loading branch information
tmandry authored Sep 9, 2020
2 parents 09c6149 + 0016405 commit 32714eb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions compiler/rustc_middle/src/mir/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1150,8 +1150,6 @@ pub enum NonUseContext {
StorageDead,
/// User type annotation assertions for NLL.
AscribeUserTy,
/// Coverage code region and counter metadata.
Coverage,
/// The data of an user variable, for debug info.
VarDebugInfo,
}
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_mir/src/borrow_check/def_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ pub fn categorize(context: PlaceContext) -> Option<DefUse> {
PlaceContext::MutatingUse(MutatingUseContext::Drop) =>
Some(DefUse::Drop),

// Coverage and debug info are neither def nor use.
PlaceContext::NonUse(NonUseContext::Coverage) |
// Debug info is neither def nor use.
PlaceContext::NonUse(NonUseContext::VarDebugInfo) => None,
}
}
1 change: 0 additions & 1 deletion compiler/rustc_mir/src/dataflow/impls/init_locals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ where
PlaceContext::NonUse(
NonUseContext::StorageLive
| NonUseContext::AscribeUserTy
| NonUseContext::Coverage
| NonUseContext::VarDebugInfo,
)
| PlaceContext::NonMutatingUse(
Expand Down

0 comments on commit 32714eb

Please sign in to comment.