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 #69909

Closed
wants to merge 38 commits into from
Closed

Commits on Feb 22, 2020

  1. Stabilize const for integer {to,from}_{be,le,ne}_bytes methods

    All of these functions can be implemented simply and naturally as
    const functions, e.g. u32::from_le_bytes can be implemented as
    
        (bytes[0] as u32)
            | (bytes[1] as u32) << 8
            | (bytes[2] as u32) << 16
            | (bytes[3] as u32) << 24
    
    So stabilizing the constness will not expose that internally they are
    implemented using transmute which is not const in stable.
    tspiteri committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    d15a98b View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2020

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

Commits on Feb 29, 2020

  1. Configuration menu
    Copy the full SHA
    503026b View commit details
    Browse the repository at this point in the history
  2. reference tracking issue

    RalfJung committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    6fd909b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d78c4aa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    df6a3a0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b133d67 View commit details
    Browse the repository at this point in the history
  6. fmt

    RalfJung committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    6e66f58 View commit details
    Browse the repository at this point in the history
  7. we cannot short-circuit just becuase the Abi seems harmless

    also add tests for ScalarPair enums
    RalfJung committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    729f4cd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bfe593e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7c84e45 View commit details
    Browse the repository at this point in the history
  10. move pattern to fn argument

    RalfJung committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    a09c33e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    cbf5f7d View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2020

  1. const forget tests

    DutchGhost committed Mar 2, 2020
    Configuration menu
    Copy the full SHA
    011fa91 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f4af54 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a674e1c View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2020

  1. constify mem::discriminant

    lcnr committed Mar 8, 2020
    Configuration menu
    Copy the full SHA
    6d03bbd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22f2385 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6bbb9b8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4b724e8 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2020

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

Commits on Mar 10, 2020

  1. fix rust-lang#62456

    contrun committed Mar 10, 2020
    Configuration menu
    Copy the full SHA
    906bb8d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0a0c850 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9263cbb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7b3e3ff View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4d16c21 View commit details
    Browse the repository at this point in the history
  6. Make Point Copy in arithmetic documentation

    Small composite types like `Point { x: i32, y: i32}` are plain
    old data and we should encourage users to derive `Copy` on them.
    
    This changes the semantics of the edited examples slightly: instead
    of consuming the operands during addition, it will copy them. This
    is desired behaviour.
    
    Co-Authored-By: Jake Goulding <shepmaster@mac.com>
    skade and shepmaster committed Mar 10, 2020
    Configuration menu
    Copy the full SHA
    69aaed8 View commit details
    Browse the repository at this point in the history
  7. parse: Tweak the function parameter edition check

    Move anon-params tests to ui/anon-params.
    petrochenkov committed Mar 10, 2020
    Configuration menu
    Copy the full SHA
    6b27e8d View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2020

  1. Rollup merge of rust-lang#66059 - RalfJung:panic-on-non-zero, r=eddyb

    mem::zeroed/uninit: panic on types that do not permit zero-initialization
    
    r? @eddyb @oli-obk
    
    Cc rust-lang#62825
    
    Also see [this summary comment](rust-lang#66059 (comment))
    Centril authored Mar 11, 2020
    Configuration menu
    Copy the full SHA
    c6a6a66 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#69373 - tspiteri:const_int_conversion, r=ol…

    …i-obk
    
    Stabilize const for integer {to,from}_{be,le,ne}_bytes methods
    
    All of these functions can be implemented simply and naturally as const functions, e.g. `u32::from_le_bytes` can be implemented as
    ```rust
    (bytes[0] as u32)
        | (bytes[1] as u32) << 8
        | (bytes[2] as u32) << 16
        | (bytes[3] as u32) << 24
    ```
    So stabilizing the constness will not expose that internally they are implemented using transmute which is not const in stable.
    Centril authored Mar 11, 2020
    Configuration menu
    Copy the full SHA
    7ef49a3 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#69591 - matthewjasper:query-response-relate…

    …, r=nikomatsakis
    
    Use TypeRelating for instantiating query responses
    
    `eq` can add constraints to `RegionConstraintData`, which isn't allowed during borrow checking outside of a `CustomTypeOp`. Use `TypeRelating` instead to always push constraints to the obligations list.
    
    closes rust-lang#69490
    Centril authored Mar 11, 2020
    Configuration menu
    Copy the full SHA
    bf1f7c9 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#69645 - DutchGhost:const-forget-tests, r=Dy…

    …lan-DPC
    
    const forget tests
    
    Adds tests for rust-lang#69617
    Centril authored Mar 11, 2020
    Configuration menu
    Copy the full SHA
    597d30c View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#69766 - skade:make-point-copy-in-add-docume…

    …ntation, r=shepmaster
    
    Make Point `Copy` in arithmetic documentation
    
    Small composite types like `Point { x: i32, y: i32}` are plain
    old data and we should encourage users to derive `Copy` on them.
    
    This changes the semantics of the edited examples slightly: instead
    of consuming the operands during addition, it will copy them. This
    is desired behaviour.
    Centril authored Mar 11, 2020
    Configuration menu
    Copy the full SHA
    deb6efc View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#69825 - lcnr:discriminant, r=oli-obk

    make `mem::discriminant` const
    
    implements rust-lang#69821, which could be used as a tracking issue for `const_discriminant`.
    
    Should this be added to the meta tracking issue rust-lang#57563?
    @Lokathor
    Centril authored Mar 11, 2020
    Configuration menu
    Copy the full SHA
    07dd9fc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b024bbc View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#69881 - Centril:fix-69485, r=oli-obk

    VariantSizeDifferences: bail on SizeOverflow
    
    Fixes rust-lang#69485.
    
    r? @oli-obk
    Centril authored Mar 11, 2020
    Configuration menu
    Copy the full SHA
    8e011e8 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#69891 - Centril:fix-69875, r=varkor

    Exhaustiveness checking, `Matrix::push`: recursively expand or-patterns
    
    > There's an implicit invariant that there should be no or-patterns directly in the first column of the matrix, but this invariant is broken exactly when an or-pattern has a child that is itself an or-pattern.
    
    Here we preserve this broken invariant by recursively expanding `PatKind::Or`s in `Matrix::push`.
    Fixes rust-lang#69875.
    
    r? @varkor
    cc @Nadrieril
    cc rust-lang#54883
    Centril authored Mar 11, 2020
    Configuration menu
    Copy the full SHA
    63464c2 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#69896 - petrochenkov:reqname2, r=Centril

    parse: Tweak the function parameter edition check
    
    Follow-up to rust-lang#69801.
    
    Edition of a code fragment is inferred from "the place where the code is written".
    For individual tokens like edition-specific keywords it may be the span of the token itself ("uninterpolated" span), but for larger code fragments it's probably not, in the test example the trait method is obviously written in "2015 edition code".
    
    r? @Centril
    Centril authored Mar 11, 2020
    Configuration menu
    Copy the full SHA
    4e34e15 View commit details
    Browse the repository at this point in the history