diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-02-24 12:02:42 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-24 12:02:42 +0530 |
| commit | f94c3c9da19451a14202a7dcffe78e08d75fd9ce (patch) | |
| tree | 3dd21bc244de5b87e513cb7dd2570a83bf130572 /compiler/rustc_query_impl/src | |
| parent | 251293ef5e563b11fc7d46b6e1a31ef740f26455 (diff) | |
| parent | b54a5fdca0ec6241cb2592a1336c67d478632d03 (diff) | |
| download | rust-f94c3c9da19451a14202a7dcffe78e08d75fd9ce.tar.gz rust-f94c3c9da19451a14202a7dcffe78e08d75fd9ce.zip | |
Rollup merge of #108370 - fbq:time-doc-fix, r=thomcc
std: time: Avoid to use "was created" in elapsed() description
".. since this instant was created" is inaccurate and misleading, consider the following case:
```rust
let i1 = Instant::now(); // i1 is created at T1
let i2 = i1 + Duration::from_nanos(0); // i2 is "created" at T2
i2.elapsed(); // at T3
```
Per the current description, `elapsed()` at T3 should return T3 - T2?
To avoid the inaccuracy, removes the "was created" in the description of {Instant,SystemTime}::elapsed().
And since these types represent times, it's OK to use prepostions with them, e.g. "since this instant".
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions
