diff options
| author | Claudio Bley <claudio.bley@gmail.com> | 2018-05-31 22:05:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-31 22:05:36 +0200 |
| commit | 95e2bf253d864c5e14ad000ffa2040ce85916056 (patch) | |
| tree | 3885e57ef058bda332d83d516fe2cfef4d33ebed /src/rustllvm/RustWrapper.cpp | |
| parent | 5342d40c1f49ef82ebff4c30fdad9f3b6fd339c1 (diff) | |
| download | rust-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
