1
Fork 0

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`
This commit is contained in:
Zalathar 2023-08-17 11:43:10 +10:00
parent 4da38c31d2
commit 8d91e71e9a
30 changed files with 48 additions and 92 deletions

View file

@ -9,9 +9,6 @@
^0
LL| 1|}
LL| |
LL| |
LL| |
LL| |
LL| 1|async fn async_func() {
LL| 1| println!("async_func was covered");
LL| 1| let b = true;
@ -21,9 +18,6 @@
^0
LL| 1|}
LL| |
LL| |
LL| |
LL| |
LL| 1|async fn async_func_just_println() {
LL| 1| println!("async_func_just_println was covered");
LL| 1|}

View file

@ -8,9 +8,6 @@ fn non_async_func() {
}
}
async fn async_func() {
println!("async_func was covered");
let b = true;
@ -19,9 +16,6 @@ async fn async_func() {
}
}
async fn async_func_just_println() {
println!("async_func_just_println was covered");
}

View file

@ -29,12 +29,6 @@ pub fn used_inline_function() {
use_this_lib_crate();
}
#[inline(always)]
pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
println!("used_only_from_bin_crate_generic_function with {:?}", arg);

View file

@ -57,16 +57,12 @@
LL| | let mut future = unsafe { Pin::new_unchecked(&mut future) };
LL| | use std::hint::unreachable_unchecked;
LL| | static VTABLE: RawWakerVTable = RawWakerVTable::new(
LL| |
LL| | #[no_coverage]
LL| | |_| unsafe { unreachable_unchecked() }, // clone
LL| |
LL| | #[no_coverage]
LL| | |_| unsafe { unreachable_unchecked() }, // wake
LL| |
LL| | #[no_coverage]
LL| | |_| unsafe { unreachable_unchecked() }, // wake_by_ref
LL| |
LL| | #[no_coverage]
LL| | |_| (),
LL| | );

View file

@ -56,16 +56,12 @@ mod executor {
let mut future = unsafe { Pin::new_unchecked(&mut future) };
use std::hint::unreachable_unchecked;
static VTABLE: RawWakerVTable = RawWakerVTable::new(
#[no_coverage]
|_| unsafe { unreachable_unchecked() }, // clone
#[no_coverage]
|_| unsafe { unreachable_unchecked() }, // wake
#[no_coverage]
|_| unsafe { unreachable_unchecked() }, // wake_by_ref
#[no_coverage]
|_| (),
);

View file

@ -59,7 +59,6 @@
LL| | }
LL| 0| }
LL| |
LL| |
LL| 1| let mut countdown = 0;
LL| 1| if true {
LL| 1| countdown = 1;

View file

@ -55,7 +55,6 @@ fn main() {
}
}
let mut countdown = 0;
if true {
countdown = 1;

View file

@ -54,10 +54,6 @@
LL| 1| return Err(1);
LL| 0| }
LL| 0|
LL| 0|
LL| 0|
LL| 0|
LL| 0|
LL| 0| let _ = Firework { strength: 1000 };
LL| 0|
LL| 0| Ok(())

View file

@ -32,10 +32,6 @@ fn main() -> Result<(),u8> {
return Err(1);
}
let _ = Firework { strength: 1000 };
Ok(())

View file

@ -9,8 +9,7 @@
LL| 1| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
LL| 1| if true {
LL| 1| if false {
LL| 0| while true {
LL| 0| }
LL| 0| while true {}
LL| 1| }
LL| 1| write!(f, "cool")?;
^0

View file

@ -9,8 +9,7 @@ impl std::fmt::Debug for DebugTest {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
if true {
if false {
while true {
}
while true {}
}
write!(f, "cool")?;
} else {

View file

@ -32,12 +32,6 @@ $DIR/auxiliary/used_inline_crate.rs:
LL| 1| use_this_lib_crate();
LL| 1|}
LL| |
LL| |
LL| |
LL| |
LL| |
LL| |
LL| |
LL| |#[inline(always)]
LL| 2|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
LL| 2| println!("used_only_from_bin_crate_generic_function with {:?}", arg);

View file

@ -7,7 +7,7 @@
LL| 1|fn main() {
LL| 1| let mut generator = || {
LL| 1| yield 1;
LL| 1| return "foo"
LL| 1| return "foo";
LL| 1| };
LL| |
LL| 1| match Pin::new(&mut generator).resume(()) {
@ -23,7 +23,7 @@
LL| 1| yield 1;
LL| 1| yield 2;
LL| 0| yield 3;
LL| 0| return "foo"
LL| 0| return "foo";
LL| 0| };
LL| |
LL| 1| match Pin::new(&mut generator).resume(()) {

View file

@ -7,7 +7,7 @@ use std::pin::Pin;
fn main() {
let mut generator = || {
yield 1;
return "foo"
return "foo";
};
match Pin::new(&mut generator).resume(()) {
@ -23,7 +23,7 @@ fn main() {
yield 1;
yield 2;
yield 3;
return "foo"
return "foo";
};
match Pin::new(&mut generator).resume(()) {