about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorBoqun Feng <boqun.feng@gmail.com>2023-02-22 14:40:43 -0800
committerBoqun Feng <boqun.feng@gmail.com>2023-02-22 14:40:43 -0800
commitb54a5fdca0ec6241cb2592a1336c67d478632d03 (patch)
tree879079660e641709d5f772aa66248a12137f2dc4 /compiler/rustc_query_impl/src
parentfdbc4329cb781c7768ffa6d76c8fa2d032d3fe20 (diff)
downloadrust-b54a5fdca0ec6241cb2592a1336c67d478632d03.tar.gz
rust-b54a5fdca0ec6241cb2592a1336c67d478632d03.zip
std: time: Avoid to use "was created" in elapsed() description
".. since this instant was created" is inaccurate and misleading,
consider the following case:

	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?

Therefore 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