diff options
| author | bors <bors@rust-lang.org> | 2020-11-08 13:49:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-08 13:49:17 +0000 |
| commit | b1277d04db0dc8009037e872a1be7cdc2bd74a43 (patch) | |
| tree | dcd3247a160a4e05fb4d629a5b02d00966124ecf /compiler/rustc_mir/src/transform/coverage/debug.rs | |
| parent | 87a0997ef9c0bfad0ba362741afa601d8fb285b8 (diff) | |
| parent | 91759b2de528f95289596e94c69b88a1927a94e0 (diff) | |
| download | rust-b1277d04db0dc8009037e872a1be7cdc2bd74a43.tar.gz rust-b1277d04db0dc8009037e872a1be7cdc2bd74a43.zip | |
Auto merge of #78874 - m-ou-se:rollup-3jp1ijj, r=m-ou-se
Rollup of 19 pull requests Successful merges: - #76097 (Stabilize hint::spin_loop) - #76227 (Stabilize `Poll::is_ready` and `is_pending` as const) - #78065 (make concurrency helper more pleasant to read) - #78570 (Remove FIXME comment in print_type_sizes ui test suite) - #78572 (Use SOCK_CLOEXEC and accept4() on more platforms.) - #78658 (Add a tool to run `x.py` from any subdirectory) - #78706 (Fix run-make tests running when LLVM is disabled) - #78728 (Constantify `UnsafeCell::into_inner` and related) - #78775 (Bump Rustfmt and RLS) - #78788 (Correct unsigned equivalent of isize to be usize) - #78811 (Make some std::io functions `const`) - #78828 (use single char patterns for split() (clippy::single_char_pattern)) - #78841 (Small cleanup in `TypeFoldable` derive macro) - #78842 (Honor the rustfmt setting in config.toml) - #78843 (Less verbose debug logging from inlining integrator) - #78852 (Convert a bunch of intra-doc links) - #78860 (rustc_resolve: Use `#![feature(format_args_capture)]`) - #78861 (typo and formatting) - #78865 (Don't fire `CONST_ITEM_MUTATION` lint when borrowing a deref) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
| -rw-r--r-- | compiler/rustc_mir/src/transform/coverage/debug.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_mir/src/transform/coverage/debug.rs b/compiler/rustc_mir/src/transform/coverage/debug.rs index cc697dfd7fe..ffa795134e2 100644 --- a/compiler/rustc_mir/src/transform/coverage/debug.rs +++ b/compiler/rustc_mir/src/transform/coverage/debug.rs @@ -147,8 +147,8 @@ impl DebugOptions { let mut counter_format = ExpressionFormat::default(); if let Ok(env_debug_options) = std::env::var(RUSTC_COVERAGE_DEBUG_OPTIONS) { - for setting_str in env_debug_options.replace(" ", "").replace("-", "_").split(",") { - let mut setting = setting_str.splitn(2, "="); + for setting_str in env_debug_options.replace(" ", "").replace("-", "_").split(',') { + let mut setting = setting_str.splitn(2, '='); match setting.next() { Some(option) if option == "allow_unused_expressions" => { allow_unused_expressions = bool_option_val(option, setting.next()); @@ -210,7 +210,7 @@ fn bool_option_val(option: &str, some_strval: Option<&str>) -> bool { fn counter_format_option_val(strval: &str) -> ExpressionFormat { let mut counter_format = ExpressionFormat { id: false, block: false, operation: false }; - let components = strval.splitn(3, "+"); + let components = strval.splitn(3, '+'); for component in components { match component { "id" => counter_format.id = true, @@ -695,7 +695,7 @@ pub(crate) fn dump_coverage_graphviz( let from_bcb_data = &basic_coverage_blocks[from_bcb]; let from_terminator = from_bcb_data.terminator(mir_body); let mut edge_labels = from_terminator.kind.fmt_successor_labels(); - edge_labels.retain(|label| label.to_string() != "unreachable"); + edge_labels.retain(|label| label != "unreachable"); let edge_counters = from_terminator .successors() .map(|&successor_bb| graphviz_data.get_edge_counter(from_bcb, successor_bb)); |
