| Age | Commit message (Collapse) | Author | Lines |
|
Bound sgx target_env with fortanix as target_vendor
This PR adds `target_vendor` check, as discussed in issue [57231](https://github.com/rust-lang/rust/issues/57231)
Signed-off-by: Yu Ding <dingelish@gmail.com>
|
|
Eliminate Receiver::recv_timeout panic
Fixes #54552.
This panic is because `recv_timeout` uses `Instant::now() + timeout` internally. This possible panic is not mentioned in the documentation for this method.
Very recently we merged (still unstable) support for checked addition (#56490) of `Instant + Duration`, so it's now finally possible to add these together without risking a panic.
|
|
|
|
Signed-off-by: Yu Ding <dingelish@gmail.com>
|
|
Fixes https://github.com/rust-lang/rust/issues/57104.
|
|
remove more copyright headers
r? @Mark-Simulacrum
|
|
Signed-off-by: Yu Ding <dingelish@gmail.com>
|
|
|
|
|
|
|
|
|
|
Fix warning when compiling rustc
|
|
Small: Fix span in char documentation
|
|
|
|
|
|
|
|
Add Unpin to std prelude, not just core
r? @alexcrichton
|
|
Add example of using the indexing operator to HashMap docs
Fixes #52575
|
|
|
|
Add `io` and `arch` modules to `std::os::fortanix_sgx`
This PR adds two more (unstable) modules to `std::os::fortanix_sgx` for the `x86_64-fortanix-unknown-sgx` target.
### io
`io` allows conversion between raw file descriptors and Rust types, similar to `std::os::unix::io`.
### arch
`arch` exposes the `ENCLU[EREPORT]` and `ENCLU[EGETKEY]` instructions. The current functions are very likely not going to be the final form of these functions (see also https://github.com/fortanix/rust-sgx/issues/15), but this should be sufficient to enable experimentation in libraries. I tried using the actual types (from the [`sgx-isa` crate](https://crates.io/crates/sgx-isa)) instead of byte arrays, but that would make `std` dependent on the `bitflags` crate which I didn't want to do at this time.
|
|
|
|
|
|
|
|
|
|
|
|
Update the stdsimd submodule
This brings in a few updates:
* Update wasm intrinsic naming for atomics
* Update and reimplement most simd128 wasm intrinsics
* Other misc improvements here and there, including a small start to
AVX-512 intrinsics
|
|
This commit switches the standard library to using the `backtrace-sys`
crate from crates.io instead of duplicating the logic here in the Rust
repositor with the `backtrace-sys`'s crate's logic.
Eventually this will hopefully be a good step towards using the
`backtrace` crate directly from crates.io itself, but we're not quite
there yet! Hopefully this is a small incremental first step we can take.
|
|
Add `std::os::fortanix_sgx` module
This PR adds the `std::os::sgx` module to expose platform-specific APIs behind the `sgx_platform` feature gate.
Depends on https://github.com/rust-lang/rust/pull/56972 to be able to meaningfully build `std::os` documentation for non-standard targets.
Tracking issue: https://github.com/rust-lang/rust/issues/56975
|
|
Stabilize min_const_unsafe_fn in 1.33
Fixes #55607
r? @oli-obk
|
|
Pin stabilization
This implements the changes suggested in https://github.com/rust-lang/rust/issues/55766#issue-378417538 and stabilizes the `pin` feature. @alexcrichton also listed several "blockers" in that issue, but then in [this comment](https://github.com/rust-lang/rust/issues/55766#issuecomment-445074980) mentioned that they're more "TODO items":
> In that vein I think it's fine for a stabilization PR to be posted at any time now with FCP lapsed for a week or so now. The final points about self/pin/pinned can be briefly discussed there (if even necessary, they could be left as the proposal above).
Let's settle these last bits here and get this thing stabilized! :)
r? @alexcrichton
cc @withoutboats
|
|
|
|
Fixed typo in HashMap documentation
Previously "with a custom type as key", now "with a custom key type"
|
|
r=Centril
Fix feature gate to point to 1.32.0 for `path_from_str`
When the feature has been added back (#55148) the feature gate has not
been adjusted accordingly. We have it enabled for 1.32.0, currently in
Beta, so adjust it.
Refs: #44431.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
Inline tweaks
r? @michaelwoerister
|
|
r=alexcrichton
Adding unwinding support for x86_64_fortanix_unknown_sgx target.
Unwinding support is provided by our port of LLVM's libunwind which is available from https://github.com/fortanix/libunwind/tree/release_50.
libunwind requires support for rwlock and printing to stderr, which is only provided by `std` for this target. This poses two problems: 1) how to expose the `std` functionality to C and 2) dependency inversion.
### Exposing `std`
For exposing the functionality we chose to expose the following symbols:
* __rust_rwlock_rdlock
* __rust_rwlock_wrlock
* __rust_rwlock_unlock
* __rust_print_err
* __rust_abort
Also, the following are needed from `alloc`:
* __rust_alloc
* __rust_dealloc
#### Rust RWLock in C
In `libunwind`, RWLock is initialized as a templated static variable:
```c
pthread_rwlock_t DwarfFDECache<A>::_lock = PTHREAD_RWLOCK_INITIALIZER;
```
I don't know of a good way to use the Rust sys::rwlock::RWLock type and initializer there. We could have a static global variable in Rust, but that doesn't work with the templating. The variable needs to be initialized statically, since this target doesn't support the .init section. Currently, I just used a byte array and standard C array initialization. The mapping between this C type and the Rust type needs to be manually maintained. There is a compile-time check and a unit test to make sure the Rust versions of these C definitions match the actual Rust type. If any reviewer knows of a better solution, please do tell.
### Dependency inversion issue
`std` depends on `panic_unwind` which depends on `libunwind`, and `libunwind` depends on `std`. This is not normally supported by Rust's linking system. Therefore we use raw C exports from `std` *and* `libunwind.a` is linked last in the target `post_link_objects` instead of being built as part of the Rust `libunwind`. Currently, all C exports are defined in `src/libstd/sys/sgx/rwlock.rs` to overcome LTO issues. Only the `__rust_rwlock_*` definitions *need* to live there for privacy reasons. Once again, if any reviewer knows of a better solution, please do tell.
r? @alexcrichton
|
|
r=QuietMisdreavus
deny intra-doc link resolution failures in libstd
Fixes #56693.
Until we land a fix for the underlying issue (#56922), we can at least fix the failures in libstd so they don't propagate to downstream crates.
|
|
rename div_euc -> div_euclid, and mod_euc -> rem_euclid
logic is written up in #49048
Also, update the documentation slightly.
cc @alexcrichton @clarcharr @varkor
|
|
|
|
Remove pin::Unpin reexport and add Unpin to the prelude.
Change Pin associated functions to methods.
Rename get_mut_unchecked_ to get_unchecked_mut
Remove impl Unpin for Pin
Mark Pin repr(transparent)
|
|
On musl targets assume certain symbols exist (like pipe2 and accept4).
This fixes #56675.
I don't know if this is the best solution, or if I should also add some tests so I'm waiting for some feedback.
Thanks!
|
|
Previously "with a custom type as key", now "with a custom key type"
|
|
asymmetrically sized sets and extend unit tests slightly beyond that
|
|
|
|
When the feature has been added back (#55148) the feature gate has not
been adjusted accordingly. We have it enabled for 1.32.0, currently in
Beta, so adjust it.
Refs: #44431.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
|
|
Always run rustc in a thread
cc @ishitatsuyuki @eddyb
r? @pnkfelix
[Previously](https://github.com/rust-lang/rust/pull/48575) we moved to only producing threads when absolutely necessary. Even before we opted to only create threads in some cases, which [is unsound](https://github.com/rust-lang/rust/pull/48575#issuecomment-380635967) due to the way we use thread local storage.
|
|
r=nikomatsakis
Less conservative uninhabitedness check
Extends the uninhabitedness check to structs, non-empty enums, tuples and arrays.
Pulled out of #47291 and #50262.
Fixes https://github.com/rust-lang/rust/issues/54586.
r? @nikomatsakis
|
|
|
|
|
|
|