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 12 pull requests #52791

Closed
wants to merge 29 commits into from

Commits on Jul 26, 2018

  1. Configuration menu
    Copy the full SHA
    db303c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    20151ca View commit details
    Browse the repository at this point in the history
  3. Fix ui test

    csmoe committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    d5347ff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    70cb75c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0db4317 View commit details
    Browse the repository at this point in the history
  6. Impl Send & Sync for JoinHandle

    Stjepan Glavina committed Jul 26, 2018
    Configuration menu
    Copy the full SHA
    89a8162 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2018

  1. rustc_metadata: test loading atoi instead of cos

    Some platforms don't actually have `libm` already linked in the test
    infrastructure, and then `dynamic_lib::tests::test_loading_cosine` would
    fail to find the "cos" symbol.  Every platform running this test should
    have `libc` and "atoi" though, so try to use that symbol instead.
    
    Fixes rust-lang#45410.
    cuviper committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    efa11da View commit details
    Browse the repository at this point in the history
  2. Omit the vendor component in Fuchsia triple

    Previously, using unknown as the vendor value would lead to the same
    result, but with the multiarch runtimes support in Clang, the target is
    now used to locate the runtime libraries and so the format is important.
    The denormalized format with omitted vendor component is the format we
    use with Clang and should be using for Rust as well.
    petrhosek committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    e950d22 View commit details
    Browse the repository at this point in the history
  3. Add stability attributes

    Stjepan Glavina committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    688db1d View commit details
    Browse the repository at this point in the history
  4. Remove unused option flag

    sinkuu committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    3170956 View commit details
    Browse the repository at this point in the history
  5. Incorporate a stray test

    sinkuu committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    b326e71 View commit details
    Browse the repository at this point in the history
  6. use slice::align_to

    RalfJung committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    3bc59b5 View commit details
    Browse the repository at this point in the history
  7. Sanity-check all constants

    oli-obk authored and RalfJung committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    b2b697e View commit details
    Browse the repository at this point in the history
  8. Update miri submodule

    oli-obk authored and RalfJung committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    35371b5 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fd616eb View commit details
    Browse the repository at this point in the history
  10. Fix doc comment for 'ptr::copy_to' method

    Zakarum committed Jul 27, 2018
    Configuration menu
    Copy the full SHA
    e25c3e2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a171ed2 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#51361 - oli-obk:sanity_check_consts, r=niko…

    …matsakis
    
    Do a basic sanity check for all constant values
    
    ## Motivation and high level overview
    
    There has been some back and forth in this PR between @RalfJung and me in here about the motivation for this change and the stance it takes on unsafe coding guidelines.
    
    The initial implementation ran its checks on every value read (so `*x`, `y = x`, ...). In unsafe code that isn't reasonable, because we might be invalidating invariants for a short time in order to build up a proper value.
    
    The current implementation is a lint that runs its checks statics and constants. There is no need to check array lengths and enum variants, because it's a hard error to end up with anything but a number, and that one even has to have the required bits to be defined.
    
    ## What checks are done?
    
    * Some type related checks
        * `char` needs to be a correct unicode character as defined by `char::from_u32`
        * A reference to a ZST must have the correct alignment (and be nonzero)
        * A reference to anything is dereferenced and its value is checked
    * Layout checks use the information from `ty::Layout` to check
        * all fields of structs
        * all elements of arrays
        * enum discriminants
        * the fields of an enum variant (the variant is decided by the discriminant)
        * whether any union field succeeds in being checked (if none match the memory pattern, the check fails)
        * if the value is in the range described by the layout (e.g. for `NonZero*` types)
    
    Changing the layout of a type will thus automatically cause the checks to check for the new layout.
    
    fixes rust-lang#51330
    fixes rust-lang#51471
    
    cc @RalfJung
    
    r? @eddyb
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    f869652 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#52702 - csmoe:mut_diff, r=estebank

    Suggest fix when encountering different mutability from impl to trait
    
    Closes rust-lang#52412
    r? @estebank
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    15bc3ef View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#52729 - ljedrz:bootstrap_tweaks, r=alexcric…

    …hton
    
    Minor improvements to bootstrap
    
    - prefer `Path`-specific methods to `String` ones
    - don't add file extensions if they are removed right afterwards
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    a35af88 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#52744 - RalfJung:align_offset, r=Kimundi

    make memrchr use align_offset
    
    I hope I did not screw that up...
    
    Cc @oli-obk who authored the original rust-lang#44537
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    0805a6b View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#52751 - QuietMisdreavus:you-shall-not-pass,…

    … r=GuillaumeGomez
    
    rustdoc: rework how default passes are chosen
    
    This is a refactor that changes how we select default passes, and changes the set of passes used for `--document-private-items`. It's groundwork for a bigger refactor i want to do.
    
    The major changes:
    
    * There are now two sets of "default passes": one set for "no flags given" and one for "document private items".
    * These sets can be selected by a new `DefaultPassOption` enum, which is selected from based on the presence of `--no-defaults` or `--document-private-items` CLI flags, or their associated crate attributes.
    * When printing the list of passes, we also print the list of passes for `--document-private-items` in addition to the "default defaults".
    * I added `propagate-doc-cfg` and `strip-priv-imports` to the "document private items" set. The former is to ensure items are properly tagged with the full set of cfg flags even when "document private items" is active. The latter is based on feedback and personal experience navigating the `rustc` docs, which use that flag. `strip-priv-imports` only removes non-pub `use` statements, so it should be harmless from a documentation standpoint to remove those items from "private items" documentation.
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    344792f View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#52759 - stjepang:impl-send-sync-for-joinhan…

    …dle, r=TimNN
    
    Impl Send & Sync for JoinHandle
    
    This is just a cosmetic change - it slightly relaxes and clarifies the public API without effectively promising any new guarantees.
    
    Currently we have [these auto trait implementations](https://doc.rust-lang.org/nightly/std/thread/struct.JoinHandle.html#synthetic-implementations):
    
    ```rust
    impl<T: Send> Send for JoinHandle<T> {}
    impl<T: Sync> Sync for JoinHandle<T> {}
    ```
    
    Bound `T: Send` doesn't make much sense because `JoinHandle<T>` can be created only when `T: Send`. Note that [`JoinHandle::<T>::join`](https://doc.rust-lang.org/nightly/std/thread/struct.JoinHandle.html#method.join) doesn't require `T: Send` so why should the `Send` impl?
    
    And the `Sync` impl doesn't need `T: Sync` because `JoinHandle<T>` cannot even share `T` - it can only send it to the thread that calls `join`.
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    e10d1c3 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#52760 - cuviper:test_loading_atoi, r=alexcr…

    …ichton
    
    rustc_metadata: test loading atoi instead of cos
    
    Some platforms don't actually have `libm` already linked in the test
    infrastructure, and then `dynamic_lib::tests::test_loading_cosine` would
    fail to find the "cos" symbol.  Every platform running this test should
    have `libc` and "atoi" though, so try to use that symbol instead.
    
    Fixes rust-lang#45410.
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    cda80f4 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#52763 - petrhosek:fuchsia-triple, r=alexcri…

    …chton
    
    Omit the vendor component in Fuchsia triple
    
    Previously, using unknown as the vendor value would lead to the same
    result, but with the multiarch runtimes support in Clang, the target is
    now used to locate the runtime libraries and so the format is important.
    The denormalized format with omitted vendor component is the format we
    use with Clang and should be using for Rust as well.
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    0af668a View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#52765 - sinkuu:remove_nonzeroing_move_opt, …

    …r=pnkfelix
    
    Remove unused "-Zenable_nonzeroing_move_hints" flag
    
    Removing a dead option which seems to be a remnant of the old drop-flag system.
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    abb7040 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#52769 - sinkuu:stray_test, r=alexcrichton

    Incorporate a stray test
    
    `liballoc/repeat-generic-slice.rs` doesn't seem to be tested (I think it was intended to be placed in `run-pass`). This PR incorporates the test into `liballoc/tests`.
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    1bcd779 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#52777 - omni-viral:master, r=TimNN

    Fix doc comment for 'ptr::copy_to' method
    
    Fix error in doc comment for `ptr::copy_to` method.
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    86b8c75 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#52779 - RalfJung:atty, r=Mark-Simulacrum

    revert accidental atty downgrade
    
    This got accidentally downgraded by rust-lang#52488
    
    Cc @nikomatsakis @pnkfelix
    Mark-Simulacrum authored Jul 27, 2018
    Configuration menu
    Copy the full SHA
    14d03a2 View commit details
    Browse the repository at this point in the history