-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 22 pull requests #57022
Rollup of 22 pull requests #57022
Conversation
RFC rust-lang#2195 specifies that a repr(int) enum such as: #[repr(u8)] enum MyEnum { B { x: u8, y: i16, z: u8 }, } has a layout that is equivalent to: #[repr(C)] enum MyEnumVariantB { tag: u8, x: u8, y: i16, z: u8 }, However this isn't actually implemented, with the actual layout being roughly equivalent to: union MyEnumPayload { B { x: u8, y: i16, z: u8 }, } #[repr(packed)] struct MyEnum { tag: u8, payload: MyEnumPayload, } Thus the variant payload is *not* subject to repr(C) ordering rules, and gets re-ordered as `{ x: u8, z: u8, z: i16 }` The existing tests added in pull-req rust-lang#45688 fail to catch this as the repr(C) ordering just happens to match the current Rust ordering in this case; adding a third field reveals the problem.
This commit updates from LLVM 7.0.0 to git revisions of clang/llvm/lld to build LLVM on our dist builders for Linux. The goal of this is to fix rust-lang#56849 by picking up a fix [1] in LLD. Closes rust-lang#56849 [1]: llvm-mirror/lld@3be4e82
Adding a map to TypeckTables to get the list of all the Upvars given a closureID. This is help us get rid of the recurring pattern in the codebase of iterating over the free vars using with_freevars.
This commit adds the Armv8-M Mainline target in the list of targets that get their dist components built. It also update the build-manifest so that this target gets also its dist components uploaded.
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)
The update is needed for the Armv8-M compilation flags.
…matsakis stop treating trait objects from #[fundamental] traits as fundamental This is a [breaking-change] to code that exploits this functionality (which should be limited to code using `#![feature(fundamental)]`. Fixes rust-lang#56503. r? @nikomatsakis
Disable field reordering for repr(int). This fixes the problem that the test in rust-lang#56619 uncovers. Closes rust-lang#56619.
…rister rustc: Update Clang used to build LLVM on Linux This commit updates from LLVM 7.0.0 to git revisions of clang/llvm/lld to build LLVM on our dist builders for Linux. The goal of this is to fix rust-lang#56849 by picking up a fix [1] in LLD. Closes rust-lang#56849 [1]: llvm-mirror/lld@3be4e82
Issue rust-lang#56905 Adding a map to TypeckTables to get the list of all the Upvars given a closureID. This is help us get rid of the recurring pattern in the codebase of iterating over the free vars using with_freevars.
Ignore ui/target-feature-gate on sparc, sparc64, powerpc, powerpc64 and powerpc64le The test ui/target-feature-gate is not applicable on sparc, sparc64, powerpc, powerpc64 and powerpc64le and consequently fails there. So just ignore it on these targets.
…fJung Remove a wrong multiplier on relocation offset computation r? @RalfJung fixes rust-lang#56800
…lacrum Add --progress to git submodule commands in x.py This is a relatively new flag, but it means that git will indicate the progress of the update as it would with regular clones. This is especially helpful as some of the submodules are really big and it's difficult to tell if it's hanging or still updating.
…richton Pin stabilization This implements the changes suggested in rust-lang#55766 (comment) and stabilizes the `pin` feature. @alexcrichton also listed several "blockers" in that issue, but then in [this comment](rust-lang#55766 (comment)) 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
…res, r=QuietMisdreavus deny intra-doc link resolution failures in libstd Fixes rust-lang#56693. Until we land a fix for the underlying issue (rust-lang#56922), we can at least fix the failures in libstd so they don't propagate to downstream crates.
Mark tuple structs as live if their constructors are used fixes rust-lang#56281
Add dist builder for Armv8-M Mainline This commit adds the Armv8-M Mainline target in the list of targets that get their dist components built. It also update the build-manifest so that this target gets also its dist components uploaded. I took example on other pull requests doing the same thing for another target to make the changes. Please feel free to comment if things needs to be added or removed. Doing `./x.py dist --target thumbv8m.main-none-eabi` worked locally so I assume that this will also work on the CI. It will (I think) however need a new release of alexcrichton/cc-rs to include the pull request rust-lang/cc-rs#363 @alexcrichton I hope to do the HardFloat version (`thumbv8m.main-none-eabihf`) and Baseline (`thumbv8m.base-none-eabi`) later, as fixes need to be done on compiler-builtins first to support those.
…r=Manishearth Mem uninit doc ptr drop Extend the mem::uninitialized documentation to account for partially initialized arrays and how to correctly handle these. These are used in some datastructures (trees for example) or in FFI. r? @Manishearth
make basic CTFE tracing available on release builds Debugging things going wrong in miri is currently pretty much impossible with a nightly Rust. r? @oli-obk
…nd-support, 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
…li-obk miri: allocation is infallible
…i-obk A few tweaks to dropck_outlives - remove an unnecessary call to `cloned()` - simplify common patterns
…ations, r=Mark-Simulacrum Fix compiletest `trim` deprecation warnings None
…li-obk suggest similar lint names for unknown lints Fixes rust-lang#54737.
…kruppe Stabilize Vec(Deque)::resize_with Closes rust-lang#41758
@bors r+ p=10 |
📌 Commit 308aca7 has been approved by |
⌛ Testing commit 308aca7 with merge 2f2de9306a5e14968bddf484e0df400af6f76f6d... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
trim
deprecation warnings #56989 (Fix compiletesttrim
deprecation warnings)Failed merges:
r? @ghost