1. 24 9月, 2020 2 次提交
  2. 23 9月, 2020 28 次提交
    • B
      Auto merge of #77090 - rust-lang:revert-76110-convert-openoptions-cint, r=dtolnay · a6008fac
      bors 提交于
      Revert "Function to convert OpenOptions to c_int"
      
      Reverts rust-lang/rust#76110. This broke Rust's stability guarantees.
      
      Closes https://github.com/rust-lang/rust/issues/77089.
      
      r? `@joshtriplett`
      a6008fac
    • B
      Auto merge of #76864 - est31:downloaded_llvm_no_clone_sources, r=Mark-Simulacrum · 33aa8be8
      bors 提交于
      Don't download/sync llvm-project submodule if download-ci-llvm is set
      
      llvm-project takes > 1GB storage space and a long time to download.
      It's better to not download it unless needed.
      33aa8be8
    • B
      Auto merge of #76659 - simonvandel:76432, r=oli-obk · feca2c22
      bors 提交于
      SimplifyComparisonIntegral: fix miscompilation
      
      Fixes #76432
      Only insert StorageDeads if we actually removed one.
      Fixes an issue where we added StorageDead to a place with no StorageLive
      
      r? `@oli-obk`
      feca2c22
    • B
      Auto merge of #76850 - ecstatic-morse:const-checking-refactor, r=oli-obk · f6d59207
      bors 提交于
      Remove `qualify_min_const_fn`
      
      ~~Blocked on #76807 (the first six commits).~~
      
      With this PR, all checks in `qualify_min_const_fn` are replicated in `check_consts`, and the former is no longer invoked. My goal was to have as few changes to test output as possible, since making sweeping changes to the code *while* doing big batches of diagnostics updates turned out to be a headache. To this end, there's a few `HACK`s in `check_consts` to achieve parity with `qualify_min_const_fn`.
      
      The new system that replaces `is_min_const_fn` is referred to as "const-stability"  My end goal for the const-stability rules is this:
      * Const-stability is only applicable to functions defined in `staged_api` crates.
      * All functions not marked `rustc_const_unstable` are considered "const-stable".
          - NB. This is currently not implemented. `#[unstable]` functions are also const-unstable. This causes problems when searching for feature gates.
          - All "const-unstable" functions have an associated feature gate
      * const-stable functions can only call other const-stable functions
           - `allow_internal_unstable` can be used to circumvent this.
      * All const-stable functions are subject to some additional checks (the ones that were unique to `qualify_min_const_fn`)
      
      The plan is to remove each `HACK` individually in subsequent PRs. That way, changes to error message output can be reviewed in isolation.
      f6d59207
    • J
      Revert "Function to convert OpenOptions to c_int" · 15f08d6d
      Joshua Nelson 提交于
      15f08d6d
    • B
      Auto merge of #77063 - cuviper:llvm-11.0.0-rc3, r=nikic · e62323df
      bors 提交于
      Rebase LLVM onto 11.0.0-rc3
      
      r? `@nikic`
      e62323df
    • B
      Auto merge of #76928 - lcnr:opaque-types-cache, r=tmandry · 6d3acf51
      bors 提交于
      cache types during normalization
      
      partially fixes #75992
      
      reduces the following test from 14 to 3 seconds locally.
      
      cc `@Mark-Simulacrum` would it make sense to add that test to `perf`?
      ```rust
      #![recursion_limit="2048"]
      #![type_length_limit="112457564"]
      
      pub async fn h0(v: &String, x: &u64) { println!("{} {}", v, x) }
      pub async fn h1(v: &String, x: &u64) { h0(v, x).await }
      pub async fn h2(v: &String, x: &u64) { h1(v, x).await }
      pub async fn h3(v: &String, x: &u64) { h2(v, x).await }
      pub async fn h4(v: &String, x: &u64) { h3(v, x).await }
      pub async fn h5(v: &String, x: &u64) { h4(v, x).await }
      pub async fn h6(v: &String, x: &u64) { h5(v, x).await }
      pub async fn h7(v: &String, x: &u64) { h6(v, x).await }
      pub async fn h8(v: &String, x: &u64) { h7(v, x).await }
      pub async fn h9(v: &String, x: &u64) { h8(v, x).await }
      
      pub async fn h10(v: &String, x: &u64) { h9(v, x).await }
      pub async fn h11(v: &String, x: &u64) { h10(v, x).await }
      pub async fn h12(v: &String, x: &u64) { h11(v, x).await }
      pub async fn h13(v: &String, x: &u64) { h12(v, x).await }
      pub async fn h14(v: &String, x: &u64) { h13(v, x).await }
      pub async fn h15(v: &String, x: &u64) { h14(v, x).await }
      pub async fn h16(v: &String, x: &u64) { h15(v, x).await }
      pub async fn h17(v: &String, x: &u64) { h16(v, x).await }
      pub async fn h18(v: &String, x: &u64) { h17(v, x).await }
      pub async fn h19(v: &String, x: &u64) { h18(v, x).await }
      
      macro_rules! async_recursive {
          (29, $inner:expr) => { async { async_recursive!(28, $inner) }.await };
          (28, $inner:expr) => { async { async_recursive!(27, $inner) }.await };
          (27, $inner:expr) => { async { async_recursive!(26, $inner) }.await };
          (26, $inner:expr) => { async { async_recursive!(25, $inner) }.await };
          (25, $inner:expr) => { async { async_recursive!(24, $inner) }.await };
          (24, $inner:expr) => { async { async_recursive!(23, $inner) }.await };
          (23, $inner:expr) => { async { async_recursive!(22, $inner) }.await };
          (22, $inner:expr) => { async { async_recursive!(21, $inner) }.await };
          (21, $inner:expr) => { async { async_recursive!(20, $inner) }.await };
          (20, $inner:expr) => { async { async_recursive!(19, $inner) }.await };
      
          (19, $inner:expr) => { async { async_recursive!(18, $inner) }.await };
          (18, $inner:expr) => { async { async_recursive!(17, $inner) }.await };
          (17, $inner:expr) => { async { async_recursive!(16, $inner) }.await };
          (16, $inner:expr) => { async { async_recursive!(15, $inner) }.await };
          (15, $inner:expr) => { async { async_recursive!(14, $inner) }.await };
          (14, $inner:expr) => { async { async_recursive!(13, $inner) }.await };
          (13, $inner:expr) => { async { async_recursive!(12, $inner) }.await };
          (12, $inner:expr) => { async { async_recursive!(11, $inner) }.await };
          (11, $inner:expr) => { async { async_recursive!(10, $inner) }.await };
          (10, $inner:expr) => { async { async_recursive!(9, $inner) }.await };
      
          (9, $inner:expr) => { async { async_recursive!(8, $inner) }.await };
          (8, $inner:expr) => { async { async_recursive!(7, $inner) }.await };
          (7, $inner:expr) => { async { async_recursive!(6, $inner) }.await };
          (6, $inner:expr) => { async { async_recursive!(5, $inner) }.await };
          (5, $inner:expr) => { async { async_recursive!(4, $inner) }.await };
          (4, $inner:expr) => { async { async_recursive!(3, $inner) }.await };
          (3, $inner:expr) => { async { async_recursive!(2, $inner) }.await };
          (2, $inner:expr) => { async { async_recursive!(1, $inner) }.await };
          (1, $inner:expr) => { async { async_recursive!(0, $inner) }.await };
          (0, $inner:expr) => { async { h19(&String::from("owo"), &0).await; $inner }.await };
      }
      
      async fn f() {
          async_recursive!(14, println!("hello"));
      }
      
      fn main() {
          let _ = f();
      }
      ```
      r? `@EddyB` requires a perf run.
      6d3acf51
    • S
      rebless after rebase · ff241633
      Simon Vandel Sillesen 提交于
      ff241633
    • S
      cleanup cfg after optimization · b6f51d6d
      Simon Vandel Sillesen 提交于
      b6f51d6d
    • S
      f472303a
    • S
      d3338dcf
    • S
      Suggestion from review · b4bdaa14
      Simon Vandel Sillesen 提交于
      Co-authored-by: NAndreas Jonson <andjo403@users.noreply.github.com>
      b4bdaa14
    • S
      MIR pass to remove unneeded drops on types not needing drop · 290dca17
      Simon Vandel Sillesen 提交于
      This is heavily dependent on MIR inlining running to actually see the drop statement
      290dca17
    • B
      Auto merge of #76810 - Mark-Simulacrum:fix-lld-macos, r=alexcrichton · 0da58007
      bors 提交于
      Don't dynamically link LLVM tools unless rustc is too
      
      This PR initially tried to support link-shared on all of our target platforms (other than Windows), but ran into a number of difficulties:
       * LLVM doesn't really support a shared link on macOS (llvm-config runs into problems with the version suffix)
       * LLVM doesn't seem to support a shared link when cross-compiling (the libLLVM.so ends up empty and symbols are not found)
      
      So, this PR has now been revised such that we don't attempt to dynamically link LLVM tools (even if that would, otherwise, be supported) on targets where LLVM is statically linked to rustc. Currently that's basically everything except for x86_64-unknown-linux-gnu (where we dynamically link to avoid rerunning ThinLTO in each stage).
      
      Follow-up to #76708.
      Fixes #76698.
      0da58007
    • D
      Use correct feature gate for unsizing casts · 186d148b
      Dylan MacKenzie 提交于
      186d148b
    • D
      60448362
    • J
      Rebase LLVM onto 11.0.0-rc3 · 883a7a5c
      Josh Stone 提交于
      883a7a5c
    • D
      Replace missing comment · 08e3822d
      Dylan MacKenzie 提交于
      08e3822d
    • D
      d60e204e
    • D
      Bless compile-fail · 9be3d106
      Dylan MacKenzie 提交于
      9be3d106
    • D
      Bless tests · ef6d4277
      Dylan MacKenzie 提交于
      ef6d4277
    • D
      3569bb63
    • D
      5ee5429e
    • D
      Allow errors to abort const checking when emitted · bfc10a89
      Dylan MacKenzie 提交于
      This is a hack for parity with `qualify_min_const_fn`, which only
      emitted a single error.
      bfc10a89
    • D
      Return `true` if `check_const` emits an error · 7fb9587a
      Dylan MacKenzie 提交于
      7fb9587a
    • D
      Add const-stability helpers · a173c5c1
      Dylan MacKenzie 提交于
      a173c5c1
    • D
      Update library functions with stability attributes · 110e59e7
      Dylan MacKenzie 提交于
      This may not be strictly minimal, but all unstable functions also need a
      `rustc_const_unstable` attribute.
      110e59e7
    • D
      Useful derives on `ops::Status` · 3dd28c78
      Dylan MacKenzie 提交于
      3dd28c78
  3. 22 9月, 2020 10 次提交
    • B
      Auto merge of #76110 - FedericoPonzi:convert-openoptions-cint, r=JoshTriplett · e0bc2675
      bors 提交于
      Function to convert OpenOptions to c_int
      
      Fixes: #74943
      The creation_mode and access_mode function were already available in the OpenOptions struct, but currently private. I've added a new free functions to unix/fs.rs which takes the OpenOptions, and returns the c_int to be used as parameter for the `open` call.
      e0bc2675
    • B
      Auto merge of #76626 - jyn514:x.py-changelog, r=Mark-Simulacrum · cbc5e4d4
      bors 提交于
      Add a changelog for x.py and nag contributors until they read it
      
      Add a changelog for x.py
      
      - Add a changelog and instructions for updating it
      - Use `changelog-seen` in `config.toml` and `VERSION` in bootstrap to determine whether the changelog has been read.  There's no way to tie reading the changelog to updating the version, so unfortunately they still have to update `config.toml` manually. Actually reading the changelog is optional, anyone can set `changelog-seen = N` without reading (although it's not recommended).
      - Nag people if they haven't read the x.py changelog
        + Print message twice to make sure it's seen
      - Give different error messages depending on whether the version needs to be updated or added
      
      Closes https://github.com/rust-lang/rust/issues/76617
      r? `@Mark-Simulacrum`
      cbc5e4d4
    • F
    • B
      Auto merge of #76906 - Nicholas-Baron:shorten_typeck_check, r=oli-obk · c113030f
      bors 提交于
      Split rustc_typeck::check into separate files
      
      Contributing to #60302.
      c113030f
    • B
      Auto merge of #76799 - Mark-Simulacrum:fix-cross-compile-dist, r=alexcrichton · 44ae0b8b
      bors 提交于
      Fix cross compiling dist/build invocations
      
      I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.
      
      Both commits are standalone; together they should resolve #76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in #76549.
      44ae0b8b
    • B
      Auto merge of #77039 - ecstatic-morse:rollup-qv3jj4a, r=ecstatic-morse · c2bc344e
      bors 提交于
      Rollup of 13 pull requests
      
      Successful merges:
      
       - #72734 (Reduce duplicate in liballoc reserve error handling)
       - #76131 (Don't use `zip` to compare iterators during pretty-print hack)
       - #76150 (Don't recommend ManuallyDrop to customize drop order)
       - #76275 (Implementation of Write for some immutable ref structs)
       - #76489 (Add explanation for E0756)
       - #76581 (do not ICE on bound variables, return `TooGeneric` instead)
       - #76655 (Make some methods of `Pin` unstable const)
       - #76783 (Only get ImplKind::Impl once)
       - #76807 (Use const-checking to forbid use of unstable features in const-stable functions)
       - #76888 (use if let instead of single match arm expressions)
       - #76914 (extend `Ty` and `TyCtxt` lints to self types)
       - #77022 (Reduce boilerplate for BytePos and CharPos)
       - #77032 (lint missing docs for extern items)
      
      Failed merges:
      
      r? `@ghost`
      c2bc344e
    • E
      Rollup merge of #77032 - lcnr:visit-all-the-item-likes, r=davidtwco · 0863f9a9
      ecstatic-morse 提交于
      lint missing docs for extern items
      
      fixes #76991
      0863f9a9
    • E
      Rollup merge of #77022 - Juici:master, r=lcnr · 359615b8
      ecstatic-morse 提交于
      Reduce boilerplate for BytePos and CharPos
      
      Reduces boilerplate code for BytePos and CharPos by using a macro to implement shared traits.
      359615b8
    • E
      Rollup merge of #76914 - lcnr:path-no-more, r=ecstatic-morse · 50d4aebc
      ecstatic-morse 提交于
      extend `Ty` and `TyCtxt` lints to self types
      
      blocked on #76891
      
      r? @ecstatic-morse cc @Aaron1011
      50d4aebc
    • E
      Rollup merge of #76888 - matthiaskrgr:clippy_single_match_2, r=Dylan-DPC · dcf4d1f2
      ecstatic-morse 提交于
      use if let instead of single match arm expressions
      
      use if let instead of single match arm expressions to compact code and reduce nesting (clippy::single_match)
      dcf4d1f2