summaryrefslogtreecommitdiffstats
path: root/tests/run-coverage/closure.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-coverage/closure.rs')
-rw-r--r--tests/run-coverage/closure.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/run-coverage/closure.rs b/tests/run-coverage/closure.rs
index eb3a1ebff..16a2c4e33 100644
--- a/tests/run-coverage/closure.rs
+++ b/tests/run-coverage/closure.rs
@@ -1,11 +1,16 @@
#![allow(unused_assignments, unused_variables)]
// compile-flags: -C opt-level=2
-fn main() { // ^^ fix described in rustc_middle/mir/mono.rs
+
+// This test used to be sensitive to certain coverage-specific hacks in
+// `rustc_middle/mir/mono.rs`, but those hacks were later cleaned up by
+// <https://github.com/rust-lang/rust/pull/83666>.
+
+fn main() {
// Initialize test constants in a way that cannot be determined at compile time, to ensure
// rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
// dependent conditions.
let is_true = std::env::args().len() == 1;
- let is_false = ! is_true;
+ let is_false = !is_true;
let mut some_string = Some(String::from("the string content"));
println!(