diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2020-09-09 15:06:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-09 15:06:07 -0700 |
| commit | 32714eb6bc3cbfe48774e85472ad8431fba3c7c8 (patch) | |
| tree | 7a8f83e2ca64a5f2225f4476ef4a61de8e4e8a2d | |
| parent | 09c614948f2499322151a12cea704885dc28f42f (diff) | |
| parent | 001640507374be965d1bfc3def758752464a474f (diff) | |
| download | rust-32714eb6bc3cbfe48774e85472ad8431fba3c7c8.tar.gz rust-32714eb6bc3cbfe48774e85472ad8431fba3c7c8.zip | |
Rollup merge of #76523 - tmiasko:non-use-context-coverage, r=wesleywiser
Remove unused PlaceContext::NonUse(NonUseContext::Coverage) r? @richkadel / @wesleywiser
| -rw-r--r-- | compiler/rustc_middle/src/mir/visit.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir/src/borrow_check/def_use.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_mir/src/dataflow/impls/init_locals.rs | 1 |
3 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/mir/visit.rs b/compiler/rustc_middle/src/mir/visit.rs index 6515ae31b46..a008bd5f75f 100644 --- a/compiler/rustc_middle/src/mir/visit.rs +++ b/compiler/rustc_middle/src/mir/visit.rs @@ -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, } diff --git a/compiler/rustc_mir/src/borrow_check/def_use.rs b/compiler/rustc_mir/src/borrow_check/def_use.rs index 6574e584406..689ec249a2f 100644 --- a/compiler/rustc_mir/src/borrow_check/def_use.rs +++ b/compiler/rustc_mir/src/borrow_check/def_use.rs @@ -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, } } diff --git a/compiler/rustc_mir/src/dataflow/impls/init_locals.rs b/compiler/rustc_mir/src/dataflow/impls/init_locals.rs index 5da302cd1fd..bb7292cd033 100644 --- a/compiler/rustc_mir/src/dataflow/impls/init_locals.rs +++ b/compiler/rustc_mir/src/dataflow/impls/init_locals.rs @@ -97,7 +97,6 @@ where PlaceContext::NonUse( NonUseContext::StorageLive | NonUseContext::AscribeUserTy - | NonUseContext::Coverage | NonUseContext::VarDebugInfo, ) | PlaceContext::NonMutatingUse( |
