mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 01:55:03 +00:00
7b2fa2077f
Closes #2543
29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
error: Calling `subsec_micros()` is more concise than this calculation
|
|
--> $DIR/duration_subsec.rs:8:22
|
|
|
|
|
8 | let bad_micros = dur.subsec_nanos() / 1_000;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `dur.subsec_micros()`
|
|
|
|
|
= note: `-D duration-subsec` implied by `-D warnings`
|
|
|
|
error: Calling `subsec_millis()` is more concise than this calculation
|
|
--> $DIR/duration_subsec.rs:12:22
|
|
|
|
|
12 | let bad_millis = dur.subsec_nanos() / 1_000_000;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `dur.subsec_millis()`
|
|
|
|
error: Calling `subsec_micros()` is more concise than this calculation
|
|
--> $DIR/duration_subsec.rs:17:13
|
|
|
|
|
17 | let _ = (&dur).subsec_nanos() / 1_000;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(&dur).subsec_micros()`
|
|
|
|
error: Calling `subsec_micros()` is more concise than this calculation
|
|
--> $DIR/duration_subsec.rs:21:13
|
|
|
|
|
21 | let _ = dur.subsec_nanos() / NANOS_IN_MICRO;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `dur.subsec_micros()`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|