diff options
| author | bors <bors@rust-lang.org> | 2021-03-19 15:38:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-19 15:38:57 +0000 |
| commit | 9f4bc3ead43a57783d8abea2fa6931a6736f3490 (patch) | |
| tree | ea7f9020ead403b250e25b49007cbc9043c9ec21 /compiler/rustc_mir/src/transform/coverage | |
| parent | b97fd3e5a1545ab02e18c52e7f3d2e78a5c960bf (diff) | |
| parent | 99f411d4385f654cfffb5126725414da8b99e211 (diff) | |
| download | rust-9f4bc3ead43a57783d8abea2fa6931a6736f3490.tar.gz rust-9f4bc3ead43a57783d8abea2fa6931a6736f3490.zip | |
Auto merge of #83301 - Dylan-DPC:rollup-x1yzvhm, r=Dylan-DPC
Rollup of 11 pull requests Successful merges: - #82500 (Reuse `std::sys::unsupported::pipe` on `hermit`) - #82759 (Remove unwrap_none/expect_none from compiler/.) - #82846 (rustdoc: allow list syntax for #[doc(alias)] attributes) - #82892 (Clarify docs for Read::read's return value) - #83179 (Extend `proc_macro_back_compat` lint to `actix-web`) - #83197 (Move some test-only code to test files) - #83208 (Fix gitattibutes for old git versions) - #83215 (Deprecate std::os::haiku::raw, which accidentally wasn't deprecated) - #83230 (Remove unnecessary `forward_inner_docs` hack) - #83236 (Upgrade memmap to memmap2) - #83270 (Fix typo/inaccuracy in the documentation of Iterator::skip_while) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage')
| -rw-r--r-- | compiler/rustc_mir/src/transform/coverage/debug.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/rustc_mir/src/transform/coverage/debug.rs b/compiler/rustc_mir/src/transform/coverage/debug.rs index 2cd0dc6b1f2..aabfee53acb 100644 --- a/compiler/rustc_mir/src/transform/coverage/debug.rs +++ b/compiler/rustc_mir/src/transform/coverage/debug.rs @@ -285,10 +285,8 @@ impl DebugCounters { ), }; counters - .insert(id, DebugCounter::new(counter_kind.clone(), some_block_label)) - .expect_none( - "attempt to add the same counter_kind to DebugCounters more than once", - ); + .try_insert(id, DebugCounter::new(counter_kind.clone(), some_block_label)) + .expect("attempt to add the same counter_kind to DebugCounters more than once"); } } @@ -479,9 +477,9 @@ impl GraphvizData { counter_kind: &CoverageKind, ) { if let Some(edge_to_counter) = self.some_edge_to_counter.as_mut() { - edge_to_counter.insert((from_bcb, to_bb), counter_kind.clone()).expect_none( - "invalid attempt to insert more than one edge counter for the same edge", - ); + edge_to_counter + .try_insert((from_bcb, to_bb), counter_kind.clone()) + .expect("invalid attempt to insert more than one edge counter for the same edge"); } } |
