13536 Commits

Author SHA1 Message Date
bors
4993524682 Auto merge of #63814 - malbarbo:wasi-error-kind, r=alexcrichton
Implement decode_error_kind for wasi

Based on the implementation for unix targets,
2019-08-23 22:09:07 +00:00
Baoshan Pang
912feabfc2 VxWorks does not provide a way to set the task name except at creation time 2019-08-23 14:39:38 -07:00
Marco A L Barbosa
c8838efe35 Implement decode_error_kind for wasi
Based on the implementation for unix targets
2019-08-23 10:48:38 -03:00
bors
3def0f3d5b Auto merge of #63815 - sebastinez:sebastinez-doc-#63792, r=jonas-schievink
Update occurences of as_slice to as_str in comments

Fix #63792
2019-08-23 12:40:32 +00:00
bors
f834695781 Auto merge of #63521 - newpavlov:redox_builder, r=pietroalbini
Re-enable Redox builder (take 2)

Closes: #63160
2019-08-23 08:58:24 +00:00
Salim Nasser
f5b1b1cdf9 VxWorks ignores the SO_SNDTIMEO socket option (this is long-standing
behavior), so skip the following tests:

net::tcp::tests::timeouts
net::udp::tests::timeouts
2019-08-22 15:26:52 -07:00
Sebastian Martinez
03507a1688
Update occurences of as_slice
Update occurences of as_slice to as_str
2019-08-22 16:16:22 -03:00
Tomasz Różański
d9f3258186 Fix for 7e13679. 2019-08-22 19:27:16 +02:00
Tomasz Różański
eae5d77995 Change variables names to be more consistent.
Changed all instances of `c_str` into `cstr` in the documentation examples. This is also consistent with the module source code.
2019-08-22 15:09:03 +02:00
Tomasz Różański
cdedd268d2 Make use of existing constants.
f32::consts::PI / 2.0 -> f32::consts::FRAC_PI_2
f32::consts::PI / 4.0 -> f32::consts::FRAC_PI_4
f64::consts::PI / 2.0 -> f64::consts::FRAC_PI_2
f64::consts::PI / 4.0 -> f64::consts::FRAC_PI_4
2019-08-22 14:59:31 +02:00
Tomasz Różański
3b04e91d27 Change code formatting for readability. 2019-08-22 14:27:51 +02:00
Tomasz Różański
49dce2935f Fix punctuation. 2019-08-22 13:14:42 +02:00
Tomasz Różański
7e13679cde Remove redundant mut. 2019-08-22 13:12:31 +02:00
newpavlov
926f36400f move cvt 2019-08-21 19:36:12 +03:00
newpavlov
a47e3c077c fixes 2019-08-21 17:57:22 +03:00
newpavlov
88fd9450aa update args 2019-08-21 04:16:05 +03:00
bors
bea0372a1a Auto merge of #63752 - Centril:rollup-nlxwety, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #62497 (Fix double resolving custom libdir)
 - #63209 (Stabilize `async_await` in Rust 1.39.0)
 - #63746 (Cherry-pick src/test changes with Centril's changes)
 - #63750 (rustc_metadata: replace LazySeq<T> with Lazy<[T]>.)

Failed merges:

r? @ghost
2019-08-20 18:33:16 +00:00
newpavlov
4dee102a67 use new get_args 2019-08-20 19:16:01 +03:00
newpavlov
7daf890d75 Merge branch 'master' into wasi 2019-08-20 19:04:16 +03:00
Mazdak Farrokhzad
3662a9fb04
Rollup merge of #63723 - josephlr:sigemptyset, r=alexcrichton
Consolidate sigemptyset workarounds

In sys/unix/process, we work around the sigemptyset linking issues
on android in two different ways. This change consolidates these
workarounds, and avoids duplicating bindings from `libc`.
2019-08-20 16:26:41 +02:00
Mazdak Farrokhzad
a5299dd5d1
Rollup merge of #63216 - oconnor663:take_read_to_end, r=sfackler
avoid unnecessary reservations in std::io::Take::read_to_end

Prevously the `read_to_end` implementation for `std::io::Take` used its
own `limit` as a cap on the `reservation_size`. However, that could
still result in an over-allocation like this:

1. Call `reader.take(5).read_to_end(&mut vec)`.
2. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
3. `read` writes 5 bytes.
4. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
5. `read` writes 0 bytes.
6. The read loop ends with `vec` having length 5 and capacity 10.

The reservation of 5 bytes was correct for the read at step 2 but
unnecessary for the read at step 4. By that second read, `Take::limit`
is 0, but the `read_to_end_with_reservation` loop is still using the
same `reservation_size` it started with.

Solve this by having `read_to_end_with_reservation` take a closure,
which lets it get a fresh `reservation_size` for each read. This is an
implementation detail which doesn't affect any public API.
2019-08-20 16:26:34 +02:00
newpavlov
744442d19a fix C incompatibilities 2019-08-20 15:43:34 +03:00
Artyom Pavlov
e500fc3171
Merge branch 'master' into redox_builder 2019-08-20 10:08:57 +00:00
Phosphorus15
e33d8707c8 Refined implementations of asinh and acosh 2019-08-20 15:12:41 +08:00
Phosphorus15
535efa4afd Used copysign to avoid unnecessary branches. 2019-08-20 12:39:12 +08:00
Mazdak Farrokhzad
b0d4782948 Stabilize 'async_await'. 2019-08-20 02:38:02 +02:00
Joe Richey
8e91dca596 Consolidate sigemptyset workarounds
In sys/unix/process, we work around the sigemptyset linking issues
on android in two different ways. This change consolidates these
workarounds, and avoids duplicating bindings from `libc`.
2019-08-19 16:15:34 -07:00
Mazdak Farrokhzad
ac34594209
Rollup merge of #63704 - Wind-River:master, r=Centril
Fixed: error: unnecessary trailing semicolon
2019-08-19 22:48:59 +02:00
Artyom Pavlov
34c9f8c649
remove any from cfgs 2019-08-19 20:02:50 +00:00
Artyom Pavlov
1dd2d3076d
cfg fix 2 2019-08-19 20:01:02 +00:00
Artyom Pavlov
1417f53863
fix cfg 2019-08-19 19:58:35 +00:00
Alex Crichton
1301b100ca std: Update backtrace crate dependency
This commit updates the `backtrace` crate from 0.3.34 to 0.3.35. The
[included set of changes][changes] for this update mostly includes some
gimli-related improvements (not relevant for the standard library) but
critically includes a fix for rust-lang/backtrace-rs#230. The standard
library will not aqcuire a session-local lock whenever a backtrace is
generated on Windows to allow external synchronization with the
`backtrace` crate itself, allowing `backtrace` to be safely used while
other threads may be panicking.

[changes]: https://github.com/rust-lang/backtrace-rs/compare/0.3.34...0.3.35
2019-08-19 06:13:18 -07:00
newpavlov
c05237686f fix 2019-08-19 16:01:21 +03:00
newpavlov
e5ba80a87c use const 2019-08-19 15:36:30 +03:00
newpavlov
7658a13c65 typo fix 2019-08-19 15:33:05 +03:00
newpavlov
338fc7d042 use non-zero clock id 2019-08-19 15:32:37 +03:00
newpavlov
8394dbba7a remove libc import 2019-08-19 15:18:39 +03:00
newpavlov
52d2871e10 use wasi::get_environ 2019-08-19 15:18:02 +03:00
newpavlov
7a4f0aece8 use wasi::get_args 2019-08-19 14:54:37 +03:00
newpavlov
75a553fa27 remove to_string 2019-08-19 13:50:22 +03:00
newpavlov
cb52065d55 replace libc::nanosleep with wasi::poll_oneoff 2019-08-19 13:31:41 +03:00
Phosphorus15
64e3a10a82 test cases for both f32 and f64 on asinh(-0.0) 2019-08-19 17:29:37 +08:00
Phosphorus15
c4569347b2 Added negative cases for asinh according to IEEE-754. 2019-08-19 17:22:08 +08:00
newpavlov
23cc850ff1 return 0 from errno function 2019-08-19 10:44:08 +03:00
newpavlov
6896ed383d use wasi crate 2019-08-19 09:47:58 +03:00
Salim Nasser
f0b394bfb6 Fixed: error: unnecessary trailing semicolon 2019-08-17 18:56:38 -07:00
Mazdak Farrokhzad
cd21715c34
Rollup merge of #63613 - petrochenkov:stdhyg, r=alexcrichton
Hygienize use of built-in macros in the standard library

Same as https://github.com/rust-lang/rust/pull/61629, but for built-in macros.

Closes https://github.com/rust-lang/rust/issues/48781
r? @alexcrichton
2019-08-16 18:22:30 +02:00
Simon Sapin
59a340963f Add the Layout of the failed allocation to TryReserveError::AllocError
… and add a separately-unstable field to force non-exhaustive matching
(`#[non_exhaustive]` is no implemented yet on enum variants)
so that we have the option to later expose the allocator’s error value.

CC https://github.com/rust-lang/wg-allocators/issues/23
2019-08-16 18:08:37 +02:00
Simon Sapin
a92c29b238 Update hashbrown to 0.5.0 2019-08-16 18:08:35 +02:00
Simon Sapin
36b18a1901 Rename CollectionAllocError to TryReserveError 2019-08-16 18:08:06 +02:00