Skip to content
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 20 pull requests #57025

Closed
wants to merge 48 commits into from
Closed

Commits on Dec 15, 2018

  1. Configuration menu
    Copy the full SHA
    7f9883d View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2018

  1. Configuration menu
    Copy the full SHA
    0815531 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf4a984 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fba23d0 View commit details
    Browse the repository at this point in the history
  4. Add test to check order of repr(int) enum fields

    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.
    petertodd authored and emilio committed Dec 16, 2018
    Configuration menu
    Copy the full SHA
    d84bdba View commit details
    Browse the repository at this point in the history
  5. 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
    alexcrichton committed Dec 16, 2018
    Configuration menu
    Copy the full SHA
    bbce189 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2018

  1. Configuration menu
    Copy the full SHA
    e38e954 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e7a4ca View commit details
    Browse the repository at this point in the history
  3. static eval: Do not ICE on layout size overflow

    Layout size overflow and typeck eval errors are reported. Trigger a bug
    only when the eval error is strictly labeled as TooGeneric.
    dlrobertson committed Dec 17, 2018
    Configuration menu
    Copy the full SHA
    e7e17f9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6130fc8 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2018

  1. Configuration menu
    Copy the full SHA
    82e55c1 View commit details
    Browse the repository at this point in the history
  2. Explain the math

    oli-obk committed Dec 18, 2018
    Configuration menu
    Copy the full SHA
    50eb5f6 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2018

  1. Configuration menu
    Copy the full SHA
    00bd306 View commit details
    Browse the repository at this point in the history
  2. Updates based on comment

    Firstyear committed Dec 19, 2018
    Configuration menu
    Copy the full SHA
    0829d0c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cbe9abb View commit details
    Browse the repository at this point in the history
  4. Fix tidy error

    Firstyear committed Dec 19, 2018
    Configuration menu
    Copy the full SHA
    b2d8040 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    202904b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    885cf2a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    81a45e2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    818ed69 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ae3f6b0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7eb67c2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a153d48 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    036ce5c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    90726e1 View commit details
    Browse the repository at this point in the history
  14. Remove TokenStream::JointTree.

    This is done by adding a new `IsJoint` field to `TokenStream::Tree`,
    which simplifies a lot of `match` statements. And likewise for
    `CursorKind`.
    
    The commit also adds a new method `TokenTree:stream()` which can replace
    a choice between `.into()` and `.joint()`.
    nnethercote committed Dec 19, 2018
    Configuration menu
    Copy the full SHA
    e7c5146 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2018

  1. Configuration menu
    Copy the full SHA
    7b6cf6e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fb18dda View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2018

  1. Rollup merge of rust-lang#56802 - clarcharr:nth_back, r=alexcrichton

    Add DoubleEndedIterator::nth_back
    
    As suggested by rust-lang#54054. This doesn't fix that issue, as this doesn't add enough implementations to optimise that specific use case, but it adds the method and a few (relatively) trivial overrides to work as an initial implementation.
    
    It's probably going to be a lot of work adding `nth_back` implementations everywhere, and I don't have the time to include it all in this commit. But, it's a start. :)
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    53295bc View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#56842 - scottmcm:vecdeque-rotate, r=alexcri…

    …chton
    
    Add unstable VecDeque::rotate_{left|right}
    
    Like the ones on slices, but more efficient because vecdeque is a circular buffer.
    
    Issue that proposed this: rust-lang#56686
    
    ~~:bomb: Please someone look very carefully at the `unsafe` in this!  The `wrap_copy` seems to be exactly what this method needs, and the `len` passed to it is never more than half the length of the deque, but I haven't managed to prove to myself that it's correct :bomb:~~ I think I proved that this code meets the requirement of the unsafe code it's calling; please double-check, of course.
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    b68927d View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#56869 - GuillaumeGomez:index-size-reduction…

    …, r=QuietMisdreavus
    
    Reduce search-index.js size
    
    Coming from:
    
    ```
    1735683 Dec 16 01:35 build/x86_64-apple-darwin/doc/search-index.js
    ```
    
    to:
    
    ```
    727755 Dec 16 01:51 build/x86_64-apple-darwin/doc/search-index.js
    ```
    
    r? @QuietMisdreavus
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    289b2d6 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#56887 - emilio:enum-field-reordering, r=eddyb

    Disable field reordering for repr(int).
    
    This fixes the problem that the test in rust-lang#56619 uncovers.
    
    Closes rust-lang#56619.
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    787e958 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#56892 - alexcrichton:new-llvm, r=michaelwoe…

    …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
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    2cd3b95 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#56909 - dlrobertson:fix_56762, r=estebank

    static eval: Do not ICE on layout size overflow
    
    Layout size overflow and typeck eval errors are reported. Trigger a bug
    only when the eval error is strictly labeled as TooGeneric.
    
    Fixes: rust-lang#56762
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    df96d1f View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#56914 - glaubitz:ignore-tests, r=alexcrichton

    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.
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    51e31ab View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#56917 - sinkuu:mir_build_logicop, r=davidtwco

    Simplify MIR generation for logical operations
    
    Reduces one block and one branch from MIR generated for a logical operator.
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    253f8db View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#56919 - oli-obk:null_ref_array_tuple, r=Ral…

    …fJung
    
    Remove a wrong multiplier on relocation offset computation
    
    r? @RalfJung
    
    fixes rust-lang#56800
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    940e236 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#56933 - clarcharr:xpy_progress, r=Mark-Simu…

    …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.
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    d42c4d7 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#56941 - euclio:deny-libstd-resolution-failu…

    …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.
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    652e138 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#56964 - nnethercote:TokenStream-IsJoint, r=…

    …petrochenkov
    
    Remove `TokenStream::JointTree`.
    
    This is done by adding a new `IsJoint` field to `TokenStream::Tree`,
    which simplifies a lot of `match` statements. And likewise for
    `CursorKind`.
    
    The commit also adds a new method `TokenTree:stream()` which can replace
    a choice between `.into()` and `.joint()`.
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    c2444d4 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#56970 - Firstyear:mem_uninit_doc_ptr_drop, …

    …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
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    a94201e View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#56973 - RalfJung:miri-trace, r=oli-obk

    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
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    910de35 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#56979 - VardhanThigle:Vardhan/rust-sgx-unwi…

    …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
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    3849c47 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#56981 - RalfJung:miri-infallible-alloc, r=o…

    …li-obk
    
    miri: allocation is infallible
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    198dc85 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#56984 - ljedrz:dropck_outlives_tweaks, r=ol…

    …i-obk
    
    A few tweaks to dropck_outlives
    
    - remove an unnecessary call to `cloned()`
    - simplify common patterns
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    6846ee9 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#56989 - phansch:fix_compiletest_trim_deprec…

    …ations, r=Mark-Simulacrum
    
    Fix compiletest `trim` deprecation warnings
    
    None
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    cfa172d View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#56992 - euclio:unknown-lint-suggestion, r=o…

    …li-obk
    
    suggest similar lint names for unknown lints
    
    Fixes rust-lang#54737.
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    4abcd26 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#57002 - scottmcm:stabilize-resize_with, r=r…

    …kruppe
    
    Stabilize Vec(Deque)::resize_with
    
    Closes rust-lang#41758
    pietroalbini committed Dec 21, 2018
    Configuration menu
    Copy the full SHA
    bc674ab View commit details
    Browse the repository at this point in the history