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 17 pull requests #57354

Merged
merged 40 commits into from
Jan 5, 2019
Merged

Rollup of 17 pull requests #57354

merged 40 commits into from
Jan 5, 2019

Commits on Dec 28, 2018

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

Commits on Dec 29, 2018

  1. Remove unused types from rustc::mir::interpret

    The types are no longer used with the change to stacked borrows for
    validation.
    matthewjasper committed Dec 29, 2018
    Configuration menu
    Copy the full SHA
    49e52e7 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2018

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

Commits on Dec 31, 2018

  1. Rename and fix nolink-with-link-args test

    There are three problems with the nolink-with-link-args test:
    
    * The test fails when using MSVC. It's caused by the `linker-flavor=ld` flag which was added in rust-lang#46291.
    * In its comment, this test tests that "link_args are indeed passed when nolink is specified", but the `nolink` attribute has been removed [a long time ago](rust-lang#12826).
    * Pattern has a small typo.
    
    At first I was going to completely remove this test, but there is [a closed pull request for that](rust-lang#21090).
    
    So:
    
    * rename the file as suggested in the closed PR
    * adjust the comment
    * fix typo in the pattern
    * add `ignore-msvc`.
    Smibu committed Dec 31, 2018
    Configuration menu
    Copy the full SHA
    794b81e View commit details
    Browse the repository at this point in the history
  2. Fix backtraces on Windows

    Zoxc committed Dec 31, 2018
    Configuration menu
    Copy the full SHA
    f4826ab View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2019

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

Commits on Jan 2, 2019

  1. Configuration menu
    Copy the full SHA
    0fd5003 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3852dc8 View commit details
    Browse the repository at this point in the history
  3. Update the stdsimd submodule

    Add a new cmpxchg16b intrinsics for x86_64!
    alexcrichton committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    c0662a0 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2019

  1. Fix 'be be' constructs

    I noticed a duplicated "be" somewhere in the code. A search for it
    manifested a couple more locations with the same problem. This change
    removes one of the "be"s.
    d-e-s-o committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    a944ecf View commit details
    Browse the repository at this point in the history
  2. VaList::copy should not require a mutable ref

    VaList::copy does not need to take a mutable reference. The va_copy
    intrinsic takes a immutable reference.
    dlrobertson committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    917985e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3fb42cf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5e3a560 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d1a42ea View commit details
    Browse the repository at this point in the history
  6. Fix repeated word typos

    Found with `git grep -P '\b([a-z]+)\s+\1\b'`
    wikku committed Jan 3, 2019
    Configuration menu
    Copy the full SHA
    190d139 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2019

  1. Configuration menu
    Copy the full SHA
    d60fa1d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b55c79 View commit details
    Browse the repository at this point in the history
  3. Update src/librustc/ty/fold.rs

    Co-Authored-By: wiktorkuchta <35867657+wiktorkuchta@users.noreply.github.com>
    awaitlink and wikku authored Jan 4, 2019
    Configuration menu
    Copy the full SHA
    632d584 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    06243b1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a1189ac View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    480d0f3 View commit details
    Browse the repository at this point in the history
  7. librustc_mir: Make qualify_min_const_fn module public

    Trying to write a `const_fn` lint for Clippy. @oli-obk suggested
    [here][link] to use the `is_min_const_fn` function from the
    `qualify_min_const_fn` module. However, the module is currently private
    and this commit makes it public.
    
    I lack any historical knowledge of the development of the `const_fn`
    feature, so I'm not sure if it was private on purpose or not. fwiw, all
    modules are already public except `qualify_min_const_fn`.
    
    [link]: rust-lang/rust-clippy#2440 (comment)
    phansch committed Jan 4, 2019
    Configuration menu
    Copy the full SHA
    79ea93c View commit details
    Browse the repository at this point in the history
  8. use delay_span_bug instead of bug! when doing layout sanity check

    It's possible that `is_object_safe` is called on a trait that is ill-formed, and we shouldn't ICE unless there are no errors being raised. Using `delay_span_bug` solves this.
    
    fixes rust-lang#56806
    mikeyhew committed Jan 4, 2019
    Configuration menu
    Copy the full SHA
    2433526 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2019

  1. Rollup merge of rust-lang#57219 - matthewjasper:mir-cleanup, r=nikoma…

    …tsakis
    
    Remove some unused code
    
    Closes rust-lang#57096
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    aa83481 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#57229 - mikeyhew:fix-56806, r=varkor

    Fix rust-lang#56806 by using `delay_span_bug` in object safety layout sanity checks
    
    It's possible that `is_object_safe` is called on a trait method that with an invalid receiver type. This caused an ICE in rust-lang#56806, because `receiver_is_dispatchable` returns `true` for `self: Box<dyn Trait>`, which causes one of the layout sanity checks in object_safety.rs to fail. Replacing `bug!` with `delay_span_bug` solves this.
    
    The fact that `receiver_is_dispatchable` returns `true` here could be considered a bug. It passes the check that the method implements, though: `Box<dyn Trait>` implements `DispatchFromDyn<Box<dyn Trait>>` because `dyn Trait` implements `Unsize<dyn Trait>`. It would be good to hear what @eddyb and @nikomatsakis think.
    
    Note that I only added a test for the case encountered in rust-lang#56806. I could not come up with a case that triggered an ICE from the other check, `bug!("receiver when Self = dyn Trait should be ScalarPair, found Scalar")`. There is no way, to my knowledge, that you can make `receiver_is_dispatchable` return true but still have a `Scalar` ABI when `Self = dyn Trait`.
    
    One other case I encountered while debugging rust-lang#56806 was that if you have a type parameter `T` that implements `Deref<Target=Self>` and `DispatchFromDyn<T>`, and use it as a method receiver, it will cause an ICE during `is_object_safe` because `T` has no layout ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d9b7497b3be0ca8382fa7d9497263214)):
    
    ```rust
    trait Trait<T: Deref<Target=Self> + DispatchFromDyn<T>> {
        fn foo(self: T) -> dyn Trait<T>;
    }
    ```
    
    I don't intend to remove the ICE there because it is a pathological case, especially since there is no way to implement `DispatchFromDyn<T>` for `T` — the checks in typeck/coherence/builtin.rs do not allow that.
    
    fixes rust-lang#56806
    r? @varkor
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    6c58b84 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#57233 - Smibu:rename-and-fix-nolink-test, r…

    …=alexcrichton
    
    Rename and fix nolink-with-link-args test
    
    There are three problems with the nolink-with-link-args test:
    
    * The test fails when using MSVC. It's caused by the `linker-flavor=ld` flag which was added in rust-lang#46291.
    * In its comment, this test tests that "link_args are indeed passed when nolink is specified", but the `nolink` attribute has been removed [a long time ago](rust-lang#12826).
    * Pattern has a small typo.
    
    At first I was going to completely remove this test, but there is [a closed pull request for that](rust-lang#21090).
    
    So:
    
    * rename the file as suggested in the closed PR
    * adjust the comment
    * fix typo in the pattern
    * add `ignore-msvc`.
    
    r? @alexcrichton
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    3d8e5d4 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#57238 - Zoxc:bt-fix, r=alexcrichton

    Fix backtraces for inlined functions on Windows
    
    Fixes an regression introduced in rust-lang#50526
    
    r? @alexcrichton
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    dd3e273 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#57249 - frewsxcv:frewsxcv-second-edition, r…

    …=KodrAus
    
    Fix broken links to second edition TRPL.
    
    Fixes rust-lang#57104.
    
    Remove `second-edition/` from TRPL hyperlinks.
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    aa5fc74 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#57267 - rust-lang:SimonSapin-patch-1, r=varkor

    src/jemalloc is gone, remove its mention from COPYRIGHT
    
    The `src/jemalloc` submodule was removed in 61e8944 / rust-lang#55238.
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    69d3c1a View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#57273 - alexcrichton:update-stdsimd, r=niko…

    …matsakis
    
    Update the stdsimd submodule
    
    Add a new cmpxchg16b intrinsics for x86_64 and some corrections for ARM/AArch64
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    85ddc4d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f11f858 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#57295 - d-e-s-o:topic/be-be, r=zackmdavis

    Fix 'be be' constructs
    
    I noticed a duplicated "be" somewhere in the code. A search for it
    manifested a couple more locations with the same problem. This change
    removes one of the "be"s.
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    952af5e View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#57311 - dlrobertson:fix_valist_copy, r=KodrAus

    VaList::copy should not require a mutable ref
    
    `VaList::copy` does not need to take a mutable reference. The `va_copy`
    intrinsic takes a immutable reference.
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    dfc1037 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#57312 - Mendess2526:master, r=Centril

    `const fn` is no longer coming soon (const keyword docs)
    
    The `const` keyword [documentation](https://doc.rust-lang.org/std/keyword.const.html) mentions that `const fn`s are coming soon, but they have already been added.
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    e1a1ab0 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#57313 - Nemo157:box-to-pin, r=cramertj

    Improve Box<T> -> Pin<Box<T>> conversion
    
    I found the `From` trait conversion for this very hard to find, having a named function for it is much more discoverable. Also fixes rust-lang#56256 as I need that in the place I'm using this.
    
    Has a placeholder tracking issue, will file an issue once I get feedback.
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    676b0b0 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#57314 - wiktorkuchta:master, r=Centril

    Fix repeated word typos
    
    Inspired by rust-lang#57295 (I skipped 'be be' because of it) and my [PR in another repo
    ](cp-algorithms/cp-algorithms#389)
    Not a stupid `sed`, I actually tried to fix case by case.
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    ab55ecf View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#57326 - king6cong:doc, r=rkruppe

    Doc rewording, use the same name `writer`
    
    None
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    a3afdd4 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#57338 - QuietMisdreavus:doctest-file-name, …

    …r=GuillaumeGomez
    
    rustdoc: force binary filename for compiled doctests
    
    Fixes rust-lang#57317, needed for rust-lang/rust-by-example#1137
    
    Right now, when building a doctest, rustdoc provides the compiler an output directory (a temp dir) but lets the compiler name the executable. If the doctest needs to be executed, it then tries to run a binary named `rust_out` from that directory. For the most part, this works fine. However, if the doctest sets its own crate name, the compiler uses that name for the output binary instead. This causes rustdoc to try to execute a nonexistent binary, causing the test to fail.
    
    This PR changes the paths rustdoc gives to the compiler when building doctests to force the output *filename* instead of just the *directory*.
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    284a419 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#57342 - phansch:make_public, r=Centril

    librustc_mir: Make qualify_min_const_fn module public
    
    Trying to write a `const_fn` lint for Clippy. @oli-obk suggested
    [here][link] to use the `is_min_const_fn` function from the
    `qualify_min_const_fn` module. However, the module is currently private
    and this commit makes it public.
    
    I lack any historical knowledge of the development of the `const_fn`
    feature, so I'm not sure if it was private on purpose or not. fwiw, all
    modules are already public except `qualify_min_const_fn`.
    
    r? @oli-obk
    
    [link]: rust-lang/rust-clippy#2440 (comment)
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    06c07f9 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#57343 - Xanewok:querify-access-levels, r=ni…

    …komatsakis
    
    Calculate privacy access only via query
    
    Initially converted to query in rust-lang@a9f6bab and then changed to respect dependencies rust-lang@8281e88.
    
    I did this as an effort to prune `CrateAnalysis` from librustc_save_analysis, with the only thing remaining being the glob map (`name` is unused, existing `crate_name` is exposed in the compiler passes, instead).
    
    Since calculating the glob map is opt-in, it'd be great if we could calculate that on-demand. However, it seems that it'd require converting resolution to queries, which I'm not sure how to do yet.
    
    In an effort to get rid of `CrateAnalysis` altogether, could we try unconditionally calculating the glob_map in the resolver, thus completely removing `CrateAnalysis` struct, and doing a perf run?
    
    r? @nikomatsakis
    
    cc @petrochenkov do you have any idea how/if at all could we querify the resolver? I've stumbled upon a comment that's ~3? years old at the moment, so I'm guessing things might have changed and it actually may be feasible now. https://github.com/rust-lang/rust/blob/fe0c10019d7ee96909cc42cc265ef999a6b5dd70/src/librustc_driver/driver.rs#L589-L593
    kennytm authored Jan 5, 2019
    Configuration menu
    Copy the full SHA
    d9885c4 View commit details
    Browse the repository at this point in the history