Tweak various coverage test files for slightly nicer formatting
For coverage tests, splitting code across multiple lines often makes the resulting coverage report easier to interpret, so we force rustfmt to retain line breaks by adding dummy line comments with `//`.
This commit is contained in:
parent
da159eb331
commit
448d63e946
15 changed files with 54 additions and 58 deletions
|
@ -1,4 +1,5 @@
|
|||
#![allow(unused_assignments)]
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
//@ failure-status: 1
|
||||
|
||||
fn call(return_error: bool) -> Result<(), ()> {
|
||||
|
@ -9,7 +10,6 @@ fn call(return_error: bool) -> Result<(), ()> {
|
|||
}
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
fn test1() -> Result<(), ()> {
|
||||
let mut
|
||||
countdown = 10
|
||||
|
@ -58,7 +58,6 @@ impl Thing2 {
|
|||
}
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
fn test2() -> Result<(), ()> {
|
||||
let thing1 = Thing1{};
|
||||
let mut
|
||||
|
@ -111,7 +110,6 @@ fn test2() -> Result<(), ()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[rustfmt::skip]
|
||||
fn main() -> Result<(), ()> {
|
||||
test1().expect_err("test1 should fail");
|
||||
test2()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue