diff options
| author | Lukas Kalbertodt <lukas.kalbertodt@gmail.com> | 2018-05-01 15:07:15 +0200 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-05-06 02:34:07 +0800 |
| commit | 10ab98da8c8e53ab7b89eff489e09d352522889e (patch) | |
| tree | f9a048c48fb2036cff0fd3b33886363dd42ab73e | |
| parent | 3ddd67ba5356b96806f039e1e8997af63c3a6ee1 (diff) | |
| download | rust-10ab98da8c8e53ab7b89eff489e09d352522889e.tar.gz rust-10ab98da8c8e53ab7b89eff489e09d352522889e.zip | |
Fix warning in `core::time` tests
| -rw-r--r-- | src/libcore/tests/time.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libcore/tests/time.rs b/src/libcore/tests/time.rs index 9e6f284859c..042c523f25f 100644 --- a/src/libcore/tests/time.rs +++ b/src/libcore/tests/time.rs @@ -77,14 +77,16 @@ fn checked_sub() { assert_eq!(zero.checked_sub(one_sec), None); } -#[test] #[should_panic] +#[test] +#[should_panic] fn sub_bad1() { - Duration::new(0, 0) - Duration::new(0, 1); + let _ = Duration::new(0, 0) - Duration::new(0, 1); } -#[test] #[should_panic] +#[test] +#[should_panic] fn sub_bad2() { - Duration::new(0, 0) - Duration::new(1, 0); + let _ = Duration::new(0, 0) - Duration::new(1, 0); } #[test] |
