1. 15 3月, 2019 22 次提交
  2. 14 3月, 2019 7 次提交
  3. 13 3月, 2019 11 次提交
    • E
      Update cargo · 45432456
      Eric Huss 提交于
      45432456
    • B
      Auto merge of #58349 - petrochenkov:uni201x, r=pnkfelix · 8bf1f1c8
      bors 提交于
      resolve: Simplify import resolution for mixed 2015/2018 edition mode
      
      Non-controversial part of https://github.com/rust-lang/rust/pull/57745.
      
      Before:
      
      | Local edition (per-span) | Global edition (--edition) | Imports (`use foo;`)                                 | Absolute paths (`::foo`)                                 |
      | ------------- |----------------|-----------------------------------------|------------------------------------------------|
      | 2018          | Any            | Uniform                                 | Extern prelude                                 |
      | 2015          | 2015           | Crate-relative                          | Crate-relative                                 |
      | 2015          | 2018           | Crate-relative with fallback to Uniform (future-proofed to error if the result is not Crate-relative or from Extern prelude) | Crate-relative with fallback to Extern prelude |
      
      After:
      
      | Local edition (per-span) | Global edition (--edition) | Imports (`use foo;`)                                 | Absolute paths (`::foo`)                                 |
      | ------------- |----------------|-----------------------------------------|------------------------------------------------|
      | 2018          | Any            | Uniform                                 | Extern prelude                                 |
      | 2015          | 2015           | Crate-relative                          | Crate-relative                                 |
      | 2015          | 2018           | Crate-relative with fallback to Extern prelude | Crate-relative with fallback to Extern prelude |
      
      I.e. only the behavior of the mixed local-2015-global-2018 mode is changed.
      This mixed mode has two goals:
      - Address regressions from https://github.com/rust-lang/rust/pull/56053#issuecomment-440826397.
      Both "before" and "after" variants address those regressions.
      - Be retrofit-able to "full 2015" edition (https://github.com/rust-lang/rust/pull/57745).
      Any more complex fallback scheme (with more candidates) than "Crate-relative with fallback to Extern prelude" will give more regressions than https://github.com/rust-lang/rust/pull/57745#issuecomment-455855089 and is therefore less retrofit-able while also being, well, more complex.
      So, we can settle on "Crate-relative with fallback to Extern prelude".
      
      (I'll hopefully proceed with https://github.com/rust-lang/rust/pull/57745 after mid-February.)
      
      r? @Centril
      8bf1f1c8
    • B
      Auto merge of #56864 - Zoxc:stable-hash-macro, r=michaelwoerister · cf6d881a
      bors 提交于
      Use derive macro for HashStable
      
      Blocked on https://github.com/rust-lang/rust/pull/56795
      cf6d881a
    • B
      Auto merge of #59151 - Centril:rollup, r=Centril · aa97448c
      bors 提交于
      Rollup of 16 pull requests
      
      Successful merges:
      
       - #58829 (librustc_interface: Update scoped-tls to 1.0)
       - #58876 (Parse lifetimes that start with a number and give specific error)
       - #58908 (Update rand version)
       - #58998 (Fix documentation of from_ne_bytes and from_le_bytes)
       - #59056 (Use lifetime contravariance to elide more lifetimes in core+alloc+std)
       - #59057 (Standardize `Range*` documentation)
       - #59080 (Fix incorrect links in librustc_codegen_llvm documentation)
       - #59083 (Fix #54822 and associated faulty tests)
       - #59093 (Remove precompute_in_scope_traits_hashes)
       - #59101 (Reduces Code Repetitions like `!n >> amt`)
       - #59121 (impl FromIterator for Result: Use assert_eq! instead of assert!)
       - #59124 (Replace assert with assert_eq)
       - #59129 (Visit impl Trait for dead_code lint)
       - #59130 (Note that NonNull does not launder shared references for mutation)
       - #59132 (ignore higher-ranked object bound conditions created by WF)
       - #59138 (Simplify Iterator::{min, max})
      
      Failed merges:
      
      r? @ghost
      aa97448c
    • M
      Rollup merge of #59138 - timvermeulen:simplify_select_fold1, r=sfackler · 73feddb9
      Mazdak Farrokhzad 提交于
      Simplify Iterator::{min, max}
      
      This PR simplifies the `select_fold1` helper method used to implmement `Iterator::{min, min_by, min_by_key, max, max_by, max_by_key}` by removing the projection argument, which was only used by the implementations of `min_by_key` and `max_by_key`.
      
      I also added tests to ensure that the stability as mentioned in the comments of `min` and `max` is preserved, and fixed the `iter::{bench_max, bench_max_by_key}` benchmarks which the compiler presumably was able to collapse into closed-form expressions. None of the benchmark results were impacted, I suspect their generated assembly didn't change.
      73feddb9
    • M
      Rollup merge of #59132 - nikomatsakis:issue-53548-generator-bound, r=pnkfelix · c22566d9
      Mazdak Farrokhzad 提交于
      ignore higher-ranked object bound conditions created by WF
      
      In the `issue-53548` test added in this PR, the `Box<dyn Trait>` type is expanded to `Box<dyn Trait + 'static>`, but the generator "witness" that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF code was encountering an ICE (when debug-assertions were enabled) and an unexpected compilation error (without debug-asserions) when trying to process this `'r` region bound. In particular, to be WF, the region bound must meet the requirements of the trait, and hence we got `for<'r> { 'r: 'static }`. This would ICE because the `Binder` constructor we were using was assering that no higher-ranked regions were involved (because the WF code is supposed to skip those). The error (if debug-asserions were disabled) came because we obviously cannot prove that `'r: 'static` for any region `'r`.  Pursuant with
      our "lazy WF" strategy for higher-ranked regions, the fix is not to require that `for<'r> { 'r: 'static }` holds (this is also analogous to what we would do for higher-ranked regions appearing within the trait in other positions).
      
      Fixes #53548
      
      r? @pnkfelix
      c22566d9
    • M
      3623c1ac
    • M
      Rollup merge of #59129 - sanxiyn:visit-impl-trait, r=varkor · b70a98f2
      Mazdak Farrokhzad 提交于
      Visit impl Trait for dead_code lint
      
      Fix #59085.
      b70a98f2
    • M
      Rollup merge of #59124 - sntdevco:master, r=Centril · f3dc0463
      Mazdak Farrokhzad 提交于
      Replace assert with assert_eq
      
      Use `assert_eq!` instead of `assert!` for the tests
      f3dc0463
    • M
      Rollup merge of #59121 - czipperz:fix_assert_result_fromiterater, r=Centril · 106159dd
      Mazdak Farrokhzad 提交于
      impl FromIterator for Result: Use assert_eq! instead of assert!
      106159dd
    • M
      Rollup merge of #59101 - kenta7777:reduce-code-repetition, r=oli-obk · 6c9bdc34
      Mazdak Farrokhzad 提交于
      Reduces Code Repetitions like `!n >> amt`
      
      Fixes #49937 .
      This PR contains defining a function which operates bit inversion and reducing bit operation like `!0u128 >> (128 - size.bits())`.
      6c9bdc34