about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2018-06-05 08:33:46 -0600
committerGitHub <noreply@github.com>2018-06-05 08:33:46 -0600
commit753e8f328fc12af94aab75aa3d4172f2b61769cc (patch)
treeed8e7147544418c943d6fbded70be7da954d982f /src/rustllvm/RustWrapper.cpp
parent1225faf1a410cbb6df347bd135fb3460cfd2a5ce (diff)
parent33c4b37d00985f8f12796ef1b0b8ff97a4f3db99 (diff)
downloadrust-753e8f328fc12af94aab75aa3d4172f2b61769cc.tar.gz
rust-753e8f328fc12af94aab75aa3d4172f2b61769cc.zip
Rollup merge of #51255 - avdv:patch-1, r=kennytm
Fix confusing error message for sub_instant

When subtracting an Instant from another, the function will panick when `RHS > self`, but the error message confusingly displays a different error:

```rust
let i = Instant::now();
let other = Instant::now();
if other > i {
    println!("{:?}", i - other);
}
```
This results in a panic:
```
thread 'test_instant' panicked at 'other was less than the current instant', libstd/sys/unix/time.rs:292:17
```
But clearly, `other` was actually greater than the current instant.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions