about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorClaudio Bley <claudio.bley@gmail.com>2018-05-31 22:05:36 +0200
committerGitHub <noreply@github.com>2018-05-31 22:05:36 +0200
commit95e2bf253d864c5e14ad000ffa2040ce85916056 (patch)
tree3885e57ef058bda332d83d516fe2cfef4d33ebed /src/rustllvm/RustWrapper.cpp
parent5342d40c1f49ef82ebff4c30fdad9f3b6fd339c1 (diff)
downloadrust-95e2bf253d864c5e14ad000ffa2040ce85916056.tar.gz
rust-95e2bf253d864c5e14ad000ffa2040ce85916056.zip
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
```
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions