Commit Graph

841 Commits

Author SHA1 Message Date
Ralf Jung 13ed0cf9e8 do not use mem::uninitialized in std::io 2019-07-19 09:45:38 +02:00
Ralf Jung 33452b0587 warn about deprecated-in-future in most of libstd 2019-07-19 09:35:32 +02:00
gnzlbg 77c14a5c5f Update the stdarch submodule 2019-07-15 14:05:28 +02:00
Chris Gregory b0c199a969 Enable mem_take feature in relevant crates 2019-07-01 20:21:53 -07:00
Mazdak Farrokhzad a99a7b7f35 Remove FnBox. 2019-06-22 06:59:27 +02:00
Alex Crichton 8eb7f36a3b std: Remove internal definitions of `cfg_if!` macro
This is duplicated in a few locations throughout the sysroot to work
around issues with not exporting a macro in libstd but still wanting it
available to sysroot crates to define blocks. Nowadays though we can
simply depend on the `cfg-if` crate on crates.io, allowing us to use it
from there!
2019-06-10 10:58:44 -07:00
Jethro Beekman a3d5e34903 Fix cfg(test) build for x86_64-fortanix-unknown-sgx 2019-06-03 13:06:35 -07:00
Ralf Jung b7afe777f7 stabilize core parts of MaybeUninit and deprecate mem::uninitialized in the future
Also expand the documentation a bit
2019-05-20 10:44:02 +02:00
Jethro Beekman adb998fe21 Fix cfg(test) build on SGX 2019-05-09 15:00:06 -07:00
Yuki OKUSHI 028e78d93a Stabilize and re-export core::array 2019-05-09 12:50:55 +09:00
Christopher Serr cf9d6672b7 Remove feature gates from std and tests 2019-04-26 12:33:42 +02:00
Mazdak Farrokhzad 3fffcd3314
Rollup merge of #60185 - NieDzejkob:int-error-kind-reexport, r=rkruppe
Reexport IntErrorKind in std

Currently `IntErrorKind` can only be found in `core`. @Centril confirmed on Discord that this is unintentional (should I r? him in this situation?).

Should there be a test for this? As far as this *specific* situation goes, I don't think so, I'll risk it and say that there's no way this regresses. However, it might be a good idea to have some tool detect public items in `core` that are not reexported in `std`. Does this belong in tidy, or should that be a separate tool? Is there some rustc-specific *linter*? Unless that's entirely a dumb idea, this should probably get an issue.

Note: My local build hasn't finished yet, but it's well past the point where I would expect problems.
2019-04-25 03:05:25 +02:00
Taylor Cramer 3f966dcd53 Stabilize futures_api 2019-04-23 16:13:53 -07:00
Jakub Kądziołka 7af0fccc88
Reexport IntErrorKind in std 2019-04-23 00:15:43 +02:00
Ralf Jung 8ef7ca1302 make lint levels more consistent 2019-04-14 10:16:23 +02:00
Simon Sapin fc928a18ba Stabilize the `alloc` crate.
This implements RFC 2480:

* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md

Closes https://github.com/rust-lang/rust/issues/27783
2019-04-12 20:07:30 +02:00
Mazdak Farrokhzad 379c380a60 libstd: deny(elided_lifetimes_in_paths) 2019-03-31 12:56:51 +02:00
Aleksey Kladov 9d408d972f Add todo!() macro
The use-case of `todo!()` macro is to be a much easier to type
alternative to `unimplemented!()` macro.
2019-03-18 19:27:31 +03:00
kennytm 6241fb55ba
Rollup merge of #59152 - smmalis37:range_contains, r=SimonSapin
Stabilize Range*::contains.

Closes https://github.com/rust-lang/rust/issues/32311. There's also a bit of rustfmt on range.rs thrown in for good measure (I forgot to turn off format-on-save in VSCode).
2019-03-16 22:40:23 +08:00
bors 70d1150478 Auto merge of #58710 - EdorianDark:master, r=sfackler
Add clamp for ranges. Implements #44095

Ready for merge
2019-03-15 06:23:21 +00:00
Steven Malis 266ca31f74 Stabilize Range*::contains. 2019-03-12 21:00:37 -07:00
Dirk Leifeld 6041ec3b78 add feature clamp 2019-03-09 20:10:48 +01:00
Jethro Beekman c0e8cf9410 Use the correct stderr when testing libstd 2019-02-28 19:09:17 -08:00
Taiki Endo 90dbf59b92 Fix some imports and paths 2019-02-28 04:06:17 +09:00
Taiki Endo 2c783c3543 Revert removed #![feature(nll)] 2019-02-28 04:06:16 +09:00
Taiki Endo 93b6d9e086 libstd => 2018 2019-02-28 04:06:15 +09:00
bors f5b5f924eb Auto merge of #58709 - kornelski:book, r=QuietMisdreavus
Update book submodule

Updates the book to the latest commit

This is to include [documentation SEO fix](https://github.com/rust-lang/book/pull/1788) ASAP.
2019-02-27 07:53:56 +00:00
bors fb162e6944 Auto merge of #58357 - sfackler:vectored-io, r=alexcrichton
Add vectored read and write support

This functionality has lived for a while in the tokio ecosystem, where
it can improve performance by minimizing copies.

r? @alexcrichton
2019-02-26 02:48:13 +00:00
bors 00aae71f50 Auto merge of #58302 - SimonSapin:tryfrom, r=alexcrichton
Stabilize TryFrom and TryInto with a convert::Infallible empty enum

This is the plan proposed in https://github.com/rust-lang/rust/issues/33417#issuecomment-423073898
2019-02-25 20:24:10 +00:00
Kornel 19c302c89a Update book submodule 2019-02-25 13:30:51 +00:00
Aleksey Kladov 88d55f537d Make std feature list sorted
This helps to avoid merge conflicts when concurrent PRs append
features to the end of the list.
2019-02-22 11:04:10 +03:00
kennytm 17b07f99e8
Rollup merge of #58395 - vi:checked_duration_since, r=dtolnay
Instant::checked_duration_since
2019-02-17 14:52:23 +08:00
Steven Fackler 31bcec648a Add vectored read and write support
This functionality has lived for a while in the tokio ecosystem, where
it can improve performance by minimizing copies.
2019-02-13 19:40:17 -08:00
Mazdak Farrokhzad 919cf42feb
Rollup merge of #57992 - Matthias247:waker4, r=cramertj
Update the future/task API

This change updates the future and task API as discussed in the stabilization RFC at https://github.com/rust-lang/rfcs/pull/2592.

Changes:
- Replacing UnsafeWake with RawWaker and RawWakerVtable
- Removal of LocalWaker
- Removal of Arc-based Wake trait
2019-02-14 02:41:17 +01:00
Simon Sapin c80a8f51dc Stabilize TryFrom and TryInto 2019-02-13 18:00:18 +01:00
bors ccd23b95e5 Auto merge of #58235 - jethrogb:jb/sgx-usercall-internals, r=alexcrichton
SGX target: simplify usercall internals

This moves logic from assembly to Rust and removes the special case for exit/panic handling, merging it with regular usercall handling.

Also, this fixes a bug in the exit usercall introduced in a75ae00. The bug would make regular exits look like panics with high probability. It would also with some probability leak information through uncleared registers.

cc @VardhanThigle

r? @alexcrichton
2019-02-13 07:46:21 +00:00
Matthias Einwag 871338c3ae Merging master 2019-02-12 22:46:14 -08:00
Vitaly _Vi Shukela 7b2a08cf49
Add Instant::checked_duration_since, address #58402. 2019-02-13 00:49:48 +03:00
Alexander Regueiro 99ed06eb88 libs: doc comments 2019-02-10 23:57:25 +00:00
Guillaume Gomez 8b886e07f5 Remove images' url to make it work even without internet connection 2019-02-07 11:06:19 +01:00
Jethro Beekman 0d2ab0b77d SGX target: simplify usercall internals
This moves logic from assembly to Rust and removes the special
case for exit/panic handling, merging it with regular usercall
handling.

Also, this fixes a bug in the exit usercall introduced in a75ae00.
The bug would make regular exits look like panics with high
probability. It would also with some probability leak information
through uncleared registers.
2019-02-06 23:24:55 +05:30
Matthias Einwag d9a4b22d32 Update the future/task API
This change updates the future and task API as discussed in the stabilization RFC at https://github.com/rust-lang/rfcs/pull/2592.

Changes:
- Replacing UnsafeWake with RawWaker and RawWakerVtable
- Removal of LocalWaker
- Removal of Arc-based Wake trait
2019-02-03 13:46:53 -08:00
gnzlbg 938a814e87 Update stdsimd 2019-01-29 10:48:54 +01:00
Mark Rousskov b7f030e114 Bump bootstrap compiler to 1.33 beta 2019-01-26 08:02:08 -07:00
Mazdak Farrokhzad e7b584cee1
Rollup merge of #57179 - Xaeroxe:patch-1, r=QuietMisdreavus
Update std/lib.rs docs to reflect Rust 2018 usage

Fixes #56544

This paragraph was written for Rust 2015.  Since 2018 has been stable for a while I think we can update it.
2019-01-24 00:19:50 +01:00
Jacob Kiesel 4781c6f8e7
Remove unused links 2019-01-22 09:39:19 -07:00
Clar Fon 24ca530526 Move spin_loop_hint to core::hint module 2019-01-15 16:44:28 -05:00
Jethro Beekman 972bba7071 Stabilize `cfg_target_vendor`, #29718 2019-01-14 14:33:04 +05:30
Mazdak Farrokhzad 85a7fc8c48
Rollup merge of #57441 - VardhanThigle:Vardhan/x86_64-fortanix-unknown-sgx-backtrace-support, r=alexcrichton
Supporting backtrace for x86_64-fortanix-unknown-sgx.

# Overview
Implementing following functions required by `libstd/sys_common` to support `backtrace`:
```
1. unwind_backtrace
2. trace_fn
3. resolve_symname
```
# Description:
The changes here are quite similar to the Cloudabi target `src/libstd/sys/cloudabi/backtrace.rs`
The first 2 functions are implemented via calls to libunwind.a that is linked to the `x86_64-fortanix-unknown-sgx` (#56979),  we have not implemented functionality needed by `resolve_symname`  (or `dladdr`) to reduce SGX TCB. Rather, we print the function address (relative to enclave image base) in `resolve_symname` which can be later translated to correct symbol name (say, via `addr2line`).

# Note:
For `x86_64-fortanix-unknown-sgx`, the `RUST_BACKTRACE` environment has to be set from within the program running in an enclave.
cc: @jethrogb
r? @alexcrichton
2019-01-12 10:55:07 +01:00
bors 0c91f3d97f Auto merge of #57234 - Centril:const-stabilizations-2, r=oli-obk
Const-stabilize `const_int_ops` + `const_ip`

r? @oli-obk

## Note for relnotes: This PR includes https://github.com/rust-lang/rust/pull/57105.

I've added T-lang since this affects intrinsics and the operational semantics of Rust's `const fn` fragment.

## Stable APIs proposed for constification

+ `const_int_ops`:
    + `count_ones`
    + `count_zeros`
    + `leading_zeros`
    + `trailing_zeros`
    + `swap_bytes`
    + `from_be`
    + `from_le`
    + `to_be`
    + `to_le`
+ `const_ip`
    + `Ipv4Addr::new`

## Unstable APIs constified

+ `const_int_conversion`:
    + `reverse_bits`
2019-01-12 02:00:18 +00:00