diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-05-29 14:06:53 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-05-29 14:34:11 +1000 |
| commit | 448d63e9469c293c3855867d29cbff210691db92 (patch) | |
| tree | 303ec93e0c1d78572190bd9549bc0d4a626c7eea /tests/coverage/try_error_result.rs | |
| parent | da159eb331b27df528185c616b394bb0e1d2a4bd (diff) | |
| download | rust-448d63e9469c293c3855867d29cbff210691db92.tar.gz rust-448d63e9469c293c3855867d29cbff210691db92.zip | |
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 `//`.
Diffstat (limited to 'tests/coverage/try_error_result.rs')
| -rw-r--r-- | tests/coverage/try_error_result.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/coverage/try_error_result.rs b/tests/coverage/try_error_result.rs index f36283c34c8..1fd176c353d 100644 --- a/tests/coverage/try_error_result.rs +++ b/tests/coverage/try_error_result.rs @@ -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() |
