Skip to content

Commit e3b83df

Browse files
committed
coverage: Force -Copt-level=2 in the unreachable-code test
This test is mainly for detecting problems triggered by MIR optimizations, but the run-coverage tests don't enable optimization by default. (The coverage-map copy has also been updated, to keep the two tests in sync.)
1 parent 4578435 commit e3b83df

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/coverage-map/unreachable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(core_intrinsics)]
22
#![feature(coverage_attribute)]
3-
// compile-flags: --edition=2021
3+
// compile-flags: --edition=2021 -Copt-level=2
44

55
// <https://github.com/rust-lang/rust/issues/116171>
66
// If we instrument a function for coverage, but all of its counter-increment

tests/run-coverage/unreachable.coverage

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
LL| |#![feature(core_intrinsics)]
22
LL| |#![feature(coverage_attribute)]
3-
LL| |// compile-flags: --edition=2021
3+
LL| |// compile-flags: --edition=2021 -Copt-level=2
44
LL| |
55
LL| |// <https://github.com/rust-lang/rust/issues/116171>
66
LL| |// If we instrument a function for coverage, but all of its counter-increment

tests/run-coverage/unreachable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(core_intrinsics)]
22
#![feature(coverage_attribute)]
3-
// compile-flags: --edition=2021
3+
// compile-flags: --edition=2021 -Copt-level=2
44

55
// <https://github.com/rust-lang/rust/issues/116171>
66
// If we instrument a function for coverage, but all of its counter-increment

0 commit comments

Comments
 (0)