Location
|
/// Returns the amount of time elapsed since this instant was created. |
|
/// |
|
/// # Panics |
|
/// |
|
/// Previous rust versions panicked when self was earlier than the current time. Currently this |
|
/// method returns a Duration of zero in that case. Future versions may reintroduce the panic. |
|
/// See [Monotonicity]. |
Summary
This is part of the documentation for std::time::Instant::elapsed. The Panics section on line 359 says:
Previous rust versions panicked when self was earlier than the current time.
Which is obviously not the case. It should be:
Previous rust versions panicked when the current time was earlier than self.
Location
rust/library/std/src/time.rs
Lines 355 to 361 in 57781b2
Summary
This is part of the documentation for
std::time::Instant::elapsed. The Panics section on line 359 says:Which is obviously not the case. It should be: