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 14 pull requests #79200

Merged
merged 43 commits into from
Nov 19, 2020
Merged

Rollup of 14 pull requests #79200

merged 43 commits into from
Nov 19, 2020

Commits on Nov 11, 2020

  1. Add a sane error for rust-call functions not taking tuples during typ…

    …e checking, and associated UI tests
    CraftSpider committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    91eabf5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf04b04 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2020

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

Commits on Nov 16, 2020

  1. Configuration menu
    Copy the full SHA
    2b7ffec View commit details
    Browse the repository at this point in the history
  2. libary: Forward compiler-builtins "asm" and "mangled-names" feature

    Now users will be able to do:
    ```
    cargo build -Zbuild-std=core -Zbuild-std-features=compiler-builtins-asm
    ```
    and correctly get the assembly implemenations for `memcpy` and friends.
    stlankes committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    207de01 View commit details
    Browse the repository at this point in the history
  3. Add //ignore-macos to pretty-std-collections.rs

    On macOS the test is flaky and sometimes fails,
    sometimes succeeds on CI.
    est31 committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    c03790f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ed26f6e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    78a37f8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2a5a379 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2020

  1. Configuration menu
    Copy the full SHA
    b4c9424 View commit details
    Browse the repository at this point in the history
  2. Use span_suggestion_verbose instead of span_suggestion for fn w…

    …ith qualifiers inside an `extern "C"` block
    ThePuzzlemaker committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    92aa0e6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b8ed466 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c825c74 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e8426a6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    614a748 View commit details
    Browse the repository at this point in the history
  7. Move capture lowering from THIR to MIR

    This allows us to:
    - Handle precise Places captured by a closure directly in MIR. Handling
    captures in MIR is easier since we can rely on/ tweak PlaceBuilder to
    generate `mir::Place`s that resemble how we store captures (`hir::Place`).
    - Allows us to handle `let _ = x` case when feature `capture_disjoint_fields`
    is enabled directly in MIR. This is required to be done in MIR since
    patterns are desugared in MIR.
    arora-aman committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    7faebe5 View commit details
    Browse the repository at this point in the history
  8. Remove THIR::ExprKind::SelfRef

    ExprKind::SelfRef was used to express accessing `self` in
    the desugared Closure/Generator struct when lowering captures in THIR.
    
    Since we handle captures in MIR now, we don't need `ExprKind::Self`.
    arora-aman committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    9f70e78 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2020

  1. Configuration menu
    Copy the full SHA
    36972b0 View commit details
    Browse the repository at this point in the history
  2. Allow using download-ci-llvm from directories other than the root

    Previously, bootstrap.py would attempt to find the LLVM commit from
    `src/llvm-project`. However, it assumed it was always being run from the
    top-level directory, which isn't always the case.
    
    Before:
    
    ```
    downloading https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz
    
    curl: (22) The requested URL returned error: 404
    failed to run: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmppyh4w8 https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz
    Build completed unsuccessfully in 0:00:02
    ```
    
    After:
    
    ```
    downloading https://ci-artifacts.rust-lang.org/rustc-builds/430feb24a46993e5073c1bb1b39da190d83fa2bf/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz
     ###################################################################################################################################################################### 100.0%
    extracting /home/joshua/rustc/src/bootstrap/build/cache/llvm-430feb24a46993e5073c1bb1b39da190d83fa2bf-False/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz
    ```
    jyn514 committed Nov 18, 2020
    Configuration menu
    Copy the full SHA
    5163912 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    efcbf1b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    85bc953 View commit details
    Browse the repository at this point in the history
  5. move fuel checks to later points in instcombine and const_prop, add o…

    …pt level flag to test
    cjkenn committed Nov 18, 2020
    Configuration menu
    Copy the full SHA
    51c2218 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1e524fb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2098ade View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3527964 View commit details
    Browse the repository at this point in the history
  9. review comment

    estebank committed Nov 18, 2020
    Configuration menu
    Copy the full SHA
    c12e77b View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2020

  1. Configuration menu
    Copy the full SHA
    b556690 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d3305a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    07de702 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#78961 - CraftSpider:22565, r=oli-obk

    Make bad "rust-call" arguments no longer ICE
    
    The simplest of bad rust-call definitions will no longer cause an ICE. There is a FIXME added for future work, as I wanted to get this easy fix in before trying to either add a hack or mess with the whole obligation system
    
    fixes rust-lang#22565
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    5a58b50 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#79082 - ThePuzzlemaker:issue-78941-fix, r=e…

    …stebank
    
    Improve the diagnostic for when an `fn` contains qualifiers inside an `extern` block.
    
    This mitigates rust-lang#78941. As suggested by ```@estebank,``` `span_suggestion` was replaced with `span_suggestion_verbose` for this specific diagnostic.
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    3f0f224 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#79090 - hermitcore:builtins, r=Mark-Simulacrum

    libary: Forward compiler-builtins "asm"  and "mangled-names" feature
    
    In principle this is a followup of rust-lang#78472. In the previous PR was the support of the test crate missing.
    
    Now users will be able to do:
    ```
    cargo build -Zbuild-std=core -Zbuild-std-features=compiler-builtins-asm
    ```
    and correctly get the assembly implemenations for `memcpy` and friends.
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    29c8e50 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#79094 - est31:ignore_macos, r=pietroalbini

    Add //ignore-macos to pretty-std-collections.rs
    
    On macOS the test is flaky and sometimes fails,
    sometimes succeeds on CI.
    
    This is no fix for the underlying issue,
    but I feel the workaround is worth it as
    the issue makes it harder
    to get things merged into master.
    
    cc rust-lang#78665
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    552d8c5 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#79101 - tmiasko:lower-func-type, r=jonas-sc…

    …hievink
    
    Don't special case constant operands when lowering intrinsics
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    05ff58e View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#79102 - Alexendoo:ice-regression-tests, r=M…

    …ark-Simulacrum
    
    Add two regression tests
    
    For rust-lang#78721 and rust-lang#78722
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    6010f7b View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#79110 - estebank:issue-58964, r=oli-obk

    Remove redundant notes in E0275
    
    Fix rust-lang#58964.
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    470f768 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#79116 - petrochenkov:gdbwarn, r=Mark-Simula…

    …crum
    
    compiletest: Fix a warning in debuginfo tests on windows-gnu
    
    The warning looked like this for me:
    ```
    Warning: C:msys64homewerust./src/etc: No such file or directory.
    ```
    It didn't affect actual testing because we don't currently emit gdb pretty-printer information into executables on windows-gnu.
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    04a4404 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#79117 - cjkenn:mir-fuel, r=oli-obk

    add optimization fuel checks to some mir passes
    
    Fixes rust-lang#77402
    
    Inserts a bunch of calls to `consider_optimizing`. Note that `consider_optimizing` is the method that actually decrements the fuel count, so the point at which it's called is when the optimization takes place, from a fuel perspective. This means that where we call it has some thought behind it:
    
    1. We probably don't want to decrement the fuel count before other simple checks, otherwise we count an optimization as being performed even if nothing was mutated (ie. it returned early).
    2. In cases like `InstCombine`, where we gather optimizations in a pass and then mutate values, we probably would rather skip the gathering pass for performance reasons rather than skip the mutations afterwards.
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    2fdcd24 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#79147 - camelid:mir-gitattributes, r=oli-obk

    Highlight MIR as Rust on GitHub
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    62838c6 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#79149 - sexxi-goose:upvar_ref, r=nikomatsakis

    Move capture lowering from THIR to MIR
    
    This allows us to:
    - Handle precise Places captured by a closure directly in MIR. Handling
      captures in MIR is easier since we can rely on/ tweak PlaceBuilder to
      generate `mir::Place`s that resemble how we store captures (`hir::Place`).
    
    - Handle `let _ = x` case when feature `capture_disjoint_fields`
      is enabled directly in MIR. This is required to be done in MIR since
      patterns are desugared in MIR.
    
    Closes: rust-lang/project-rfc-2229#25
    
    r? ```@nikomatsakis```
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    5c7d530 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#79155 - 12101111:fix-profiler-config, r=Mar…

    …k-Simulacrum
    
    fix handling the default config for profiler and sanitizers
    
    rust-lang#78354 don't handle the case that user don't add any target-specific config in `[target.*]` of `config.toml`:
    ```toml
    changelog-seen = 2
    [llvm]
    link-shared = true
    [build]
    sanitizers = true
    profiler = true
    [install]
    [rust]
    [dist]
    ```
    
    The previes code handle the default config in `Config::prase()`:
    
    ```rust
    target.sanitizers = cfg.sanitizers.unwrap_or(build.sanitizers.unwrap_or_default());
    target.profiler = cfg.profiler.unwrap_or(build.profiler.unwrap_or_default());
    config.target_config.insert(TargetSelection::from_user(&triple), target);
    ```
    
    In this case, `toml.target` don't contain any target, so the above code won't execute. Instead, a default `Target` is insert in https://github.com/rust-lang/rust/blob/c919f490bbcd2b29b74016101f7ec71aaa24bdbb/src/bootstrap/sanity.rs#L162-L166
    
    The default value for `bool` is false, hence the issue in rust-lang#79124
    
    This fix change the type of `sanitizers` and `profiler` to `Option<bool>`, so the default value is `None`, and fallback config is handled in  `Config::sanitizers_enabled` and `Config::profiler_enabled`
    
    fix rust-lang#79124
    
    cc `@Mark-Simulacrum` `@richkadel`
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    3b857a5 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#79156 - jyn514:relative-llvm, r=Mark-Simula…

    …crum
    
    Allow using `download-ci-llvm` from directories other than the root
    
    Previously, bootstrap.py would attempt to find the LLVM commit from
    `src/llvm-project`. However, it assumed it was always being run from the
    top-level directory, which isn't always the case.
    
    Before:
    
    ```
    downloading https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz
    
    curl: (22) The requested URL returned error: 404
    failed to run: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmppyh4w8 https://ci-artifacts.rust-lang.org/rustc-builds//rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz
    Build completed unsuccessfully in 0:00:02
    ```
    
    After:
    
    ```
    downloading https://ci-artifacts.rust-lang.org/rustc-builds/430feb24a46993e5073c1bb1b39da190d83fa2bf/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz
     ###################################################################################################################################################################### 100.0%
    extracting /home/joshua/rustc/src/bootstrap/build/cache/llvm-430feb24a46993e5073c1bb1b39da190d83fa2bf-False/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz
    ```
    
    r? ```@Mark-Simulacrum```
    cc ```@pnkfelix```
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    de62272 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#79164 - varkor:unbraced-single-segment-cons…

    …t-arguments, r=petrochenkov
    
    Permit standalone generic parameters as const generic arguments in macros
    
    Fixes rust-lang#79127.
    
    r? ```@petrochenkov```
    Dylan-DPC committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    b5fffdc View commit details
    Browse the repository at this point in the history