Skip to content

Commit 8d91e71

Browse files
committed
Various trivial formatting fixes in run-coverage tests
These changes were made by manually running `rustfmt` on all of the test files, and then manually undoing all cases where the original formatting appeared to have been deliberate. `rustfmt +nightly --config-path=/dev/null --edition=2021 tests/run-coverage*/**/*.rs`
1 parent 4da38c3 commit 8d91e71

30 files changed

+48
-92
lines changed

tests/run-coverage/assert.coverage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
^1
88
LL| 3|}
99
LL| |
10-
LL| 1|fn main() -> Result<(),u8> {
10+
LL| 1|fn main() -> Result<(), u8> {
1111
LL| 1| let mut countdown = 10;
1212
LL| 11| while countdown > 0 {
1313
LL| 11| if countdown == 1 {

tests/run-coverage/assert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fn might_fail_assert(one_plus_one: u32) {
66
assert_eq!(1 + 1, one_plus_one, "the argument was wrong");
77
}
88

9-
fn main() -> Result<(),u8> {
9+
fn main() -> Result<(), u8> {
1010
let mut countdown = 10;
1111
while countdown > 0 {
1212
if countdown == 1 {

tests/run-coverage/async2.coverage

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
^0
1010
LL| 1|}
1111
LL| |
12-
LL| |
13-
LL| |
14-
LL| |
1512
LL| 1|async fn async_func() {
1613
LL| 1| println!("async_func was covered");
1714
LL| 1| let b = true;
@@ -21,9 +18,6 @@
2118
^0
2219
LL| 1|}
2320
LL| |
24-
LL| |
25-
LL| |
26-
LL| |
2721
LL| 1|async fn async_func_just_println() {
2822
LL| 1| println!("async_func_just_println was covered");
2923
LL| 1|}

tests/run-coverage/async2.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ fn non_async_func() {
88
}
99
}
1010

11-
12-
13-
1411
async fn async_func() {
1512
println!("async_func was covered");
1613
let b = true;
@@ -19,9 +16,6 @@ async fn async_func() {
1916
}
2017
}
2118

22-
23-
24-
2519
async fn async_func_just_println() {
2620
println!("async_func_just_println was covered");
2721
}

tests/run-coverage/auxiliary/inline_always_with_dead_code.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
mod foo {
66
#[inline(always)]
7-
pub fn called() { }
7+
pub fn called() {}
88

9-
fn uncalled() { }
9+
fn uncalled() {}
1010
}
1111

1212
pub mod bar {

tests/run-coverage/auxiliary/used_inline_crate.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ pub fn used_inline_function() {
2929
use_this_lib_crate();
3030
}
3131

32-
33-
34-
35-
36-
37-
3832
#[inline(always)]
3933
pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
4034
println!("used_only_from_bin_crate_generic_function with {:?}", arg);

tests/run-coverage/closure.coverage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
LL| 1| // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
1111
LL| 1| // dependent conditions.
1212
LL| 1| let is_true = std::env::args().len() == 1;
13-
LL| 1| let is_false = ! is_true;
13+
LL| 1| let is_false = !is_true;
1414
LL| 1|
1515
LL| 1| let mut some_string = Some(String::from("the string content"));
1616
LL| 1| println!(

tests/run-coverage/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn main() {
1010
// rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
1111
// dependent conditions.
1212
let is_true = std::env::args().len() == 1;
13-
let is_false = ! is_true;
13+
let is_false = !is_true;
1414

1515
let mut some_string = Some(String::from("the string content"));
1616
println!(

tests/run-coverage/closure_macro_async.coverage

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,12 @@
5757
LL| | let mut future = unsafe { Pin::new_unchecked(&mut future) };
5858
LL| | use std::hint::unreachable_unchecked;
5959
LL| | static VTABLE: RawWakerVTable = RawWakerVTable::new(
60-
LL| |
6160
LL| | #[no_coverage]
6261
LL| | |_| unsafe { unreachable_unchecked() }, // clone
63-
LL| |
6462
LL| | #[no_coverage]
6563
LL| | |_| unsafe { unreachable_unchecked() }, // wake
66-
LL| |
6764
LL| | #[no_coverage]
6865
LL| | |_| unsafe { unreachable_unchecked() }, // wake_by_ref
69-
LL| |
7066
LL| | #[no_coverage]
7167
LL| | |_| (),
7268
LL| | );

tests/run-coverage/closure_macro_async.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,12 @@ mod executor {
5656
let mut future = unsafe { Pin::new_unchecked(&mut future) };
5757
use std::hint::unreachable_unchecked;
5858
static VTABLE: RawWakerVTable = RawWakerVTable::new(
59-
6059
#[no_coverage]
6160
|_| unsafe { unreachable_unchecked() }, // clone
62-
6361
#[no_coverage]
6462
|_| unsafe { unreachable_unchecked() }, // wake
65-
6663
#[no_coverage]
6764
|_| unsafe { unreachable_unchecked() }, // wake_by_ref
68-
6965
#[no_coverage]
7066
|_| (),
7167
);

0 commit comments

Comments
 (0)