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 10 pull requests #79345

Merged
merged 26 commits into from
Nov 23, 2020
Merged

Rollup of 10 pull requests #79345

merged 26 commits into from
Nov 23, 2020

Commits on Nov 15, 2020

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

Commits on Nov 20, 2020

  1. Configuration menu
    Copy the full SHA
    34ea5d0 View commit details
    Browse the repository at this point in the history
  2. update bug message for cg

    lcnr committed Nov 20, 2020
    Configuration menu
    Copy the full SHA
    c85af74 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2020

  1. Configuration menu
    Copy the full SHA
    ee6f42b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    71d350e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e69fcea View commit details
    Browse the repository at this point in the history
  4. Add some more tests

    jonas-schievink committed Nov 22, 2020
    Configuration menu
    Copy the full SHA
    cb40684 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    674f196 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e0871cc View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2020

  1. stabilize const_int_pow

    Also stabilize constctlz for const ctlz_nonzero.
    
    The public methods stabilized const by this commit are:
    
      * `{i*,u*}::checked_pow`
      * `{i*,u*}::saturating_pow`
      * `{i*,u*}::wrapping_pow`
      * `{i*,u*}::overflowing_pow`
      * `{i*,u*}::pow`
      * `u*::next_power_of_two`
      * `u*::checked_next_power_of_two`
      * `u*::wrapping_next_power_of_two` (the method itself is still unstable)
    tspiteri committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    aca37b6 View commit details
    Browse the repository at this point in the history
  2. const_int_pow will be stabilized in 1.50.0, not in 1.49.0

    Same for constctlz.
    tspiteri committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    a6bcf7a View commit details
    Browse the repository at this point in the history
  3. Fix typo in comment

    jyn514 committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    432a33e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b196bec View commit details
    Browse the repository at this point in the history
  5. doc typo

    plus a small edit for clarity
    oliver authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    a804e38 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cd89732 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c7d1189 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of #76829 - tspiteri:const-int-pow, r=oli-obk

    stabilize const_int_pow
    
    This also requires stabilizing constctlz for const ctlz_nonzero.
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    703f176 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of #79080 - camelid:mir-visit-debuginfo-project, r=jonas…

    …-schievink
    
    MIR visitor: Don't treat debuginfo field access as a use of the struct
    
    Fixes #77454.
    
    r? `@jonas-schievink`
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    d4a0569 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of #79236 - lcnr:mcg-resolve-dsb, r=eddyb

    const_generics: assert resolve hack causes an error
    
    prevent the min_const_generics `HACK`s in resolve from triggering a fallback path which successfully compiles so that we don't have to worry about future compat issues when removing it
    
    r? `@eddyb` cc `@varkor`
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    c58c245 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of #79287 - jonas-schievink:const-trait-impl, r=oli-obk

    Allow using generic trait methods in `const fn`
    
    Next step for #67792, this now also allows code like the following:
    
    ```rust
    struct S;
    
    impl const PartialEq for S {
        fn eq(&self, _: &S) -> bool {
            true
        }
    }
    
    const fn equals_self<T: PartialEq>(t: &T) -> bool {
        *t == *t
    }
    
    pub const EQ: bool = equals_self(&S);
    ```
    
    This works by threading const-ness of trait predicates through trait selection, in particular through `ParamCandidate`, and exposing it in the resulting `ImplSource`.
    
    Since this change makes two bounds `T: Trait` and `T: ?const Trait` that only differ in their const-ness be treated like different bounds, candidate winnowing has been changed to drop the `?const` candidate in favor of the const candidate, to avoid ambiguities when both a const and a non-const bound is present.
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    c7a6720 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of #79324 - LingMan:and_then, r=jonas-schievink

    Use Option::and_then instead of open-coding it
    
    `@rustbot` modify labels to +C-cleanup.
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    32be3ae View commit details
    Browse the repository at this point in the history
  13. Rollup merge of #79325 - LingMan:try_op, r=jonas-schievink

    Reduce boilerplate with the `?` operator
    
    `@rustbot` modify labels to +C-cleanup.
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    b4db342 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of #79330 - jyn514:typo, r=jyn514

    Fix typo in comment
    
    This is trivial enough I'm just going to merge without review.
    
    r? `@ghost`
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    b48ebc6 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of #79333 - o752d:patch-3, r=Mark-Simulacrum

    doc typo
    
    plus a small edit for clarity
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    a0cf162 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of #79337 - LingMan:map, r=jyn514

    Use Option::map instead of open coding it
    
    r?  `@jonas-schievink` since you're frequently sniping these minor cleanups anyway.
    `@rustbot` modify labels +C-cleanup  +T-compiler
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    064c3c1 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of #79343 - flip1995:mailmap, r=Mark-Simulacrum

    Add my (@flip1995) work mail to the mailmap
    jonas-schievink authored Nov 23, 2020
    Configuration menu
    Copy the full SHA
    ea3c269 View commit details
    Browse the repository at this point in the history