rust/src/libstd
bors ca94c75c52 Auto merge of #44220 - kennytm:fix-44216-instance-plus-max-duration-should-panic, r=alexcrichton
Properly detect overflow in Instance ± Duration.

Fix #44216.
Fix #42622

The computation `Instant::now() + Duration::from_secs(u64::max_value())` now panics. The call `receiver.recv_timeout(Duration::from_secs(u64::max_value()))`, which involves such time addition, will also panic.

The reason #44216 arises is because of an unchecked cast from `u64` to `i64`, making the duration equivalent to -1 second.

Note that the current implementation is over-conservative, since e.g. (-2⁶²) + (2⁶³) is perfectly fine for an `i64`, yet this is rejected because (2⁶³) overflows the `i64`.
2017-09-10 18:37:27 +00:00
..
collections use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
ffi Use rvalue promotion to 'static instead of static items. 2017-09-10 11:20:27 +03:00
io Fix tests 2017-09-01 20:07:04 +12:00
net Rollup merge of #44209 - frewsxcv:frewsxcv-addr-other-scenarios, r=alexcrichton 2017-08-31 18:07:46 -06:00
os Update the libc submodule 2017-08-28 07:58:19 -07:00
prelude Move unused-extern-crate to late pass 2017-08-27 19:02:24 +09:00
rand Introduce tidy lint to check for inconsistent tracking issues 2017-06-16 20:40:40 +02:00
sync Rollup merge of #43891 - Fourchaux:master, r=steveklabnik 2017-08-17 10:44:07 -04:00
sys Auto merge of #44220 - kennytm:fix-44216-instance-plus-max-duration-should-panic, r=alexcrichton 2017-09-10 18:37:27 +00:00
sys_common Add libbacktrace support for Apple platforms 2017-09-02 03:24:15 +08:00
thread std:🧵:LocalKey: Document limitation with initializers 2017-09-07 12:57:08 -07:00
time Disable the 80-year-difference test on 32-bit-time_t platforms. 2017-09-07 17:14:27 +08:00
ascii.rs Reduce str transmutes, add mut versions of methods. 2017-04-09 19:13:54 -04:00
build.rs Auto merge of #44251 - kennytm:osx-backtrace, r=alexcrichton 2017-09-09 17:32:13 +00:00
Cargo.toml Switch to rust-lang-nursery/compiler-builtins 2017-07-05 07:08:36 -07:00
env.rs Move global vars changing tests into run-pass 2017-06-24 18:23:39 +03:00
error.rs Fixed errors in libstd. 2017-08-02 15:16:20 +01:00
f32.rs Revert "Add clamp functions" 2017-09-08 16:07:21 -06:00
f64.rs Revert "Add clamp functions" 2017-09-08 16:07:21 -06:00
fs.rs Clarify 'writable'-changing behavior of set_readonly. 2017-08-15 21:43:11 -04:00
heap.rs Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
lib.rs Auto merge of #44438 - Xaeroxe:clamp, r=Mark-Simulacrum 2017-09-09 09:13:03 +00:00
macros.rs Use rvalue promotion to 'static instead of static items. 2017-09-10 11:20:27 +03:00
memchr.rs Fix inconsistent doc headings 2017-08-24 18:42:53 +02:00
num.rs Auto merge of #40706 - irfanhudda:doc-next-power-of-two, r=alexcrichton 2017-06-08 01:07:08 +00:00
panic.rs Fix some typos 2017-08-12 14:01:11 +02:00
panicking.rs Update bootstrap compiler 2017-08-31 06:58:58 -07:00
path.rs Rollup merge of #43983 - ids1024:redox-path-prefix, r=alexcrichton 2017-08-23 08:44:25 -04:00
primitive_docs.rs Mention null_mut on the pointer primitive docs. 2017-08-22 12:00:05 -05:00
process.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
rt.rs Update bootstrap compiler 2017-08-31 06:58:58 -07:00