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

Stabilize some Result methods as const #76136

Merged
merged 5 commits into from
Sep 20, 2020
Merged

Commits on Aug 31, 2020

  1. Stabilize some Result methods as const

    Stabilize the following methods of `Result` as const:
     - `is_ok`
     - `is_err`
     - `as_ref`
    
    Possible because of stabilization of rust-lang#49146 (Allow if and match in constants).
    CDirkx committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    518f1cc View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2020

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

Commits on Sep 20, 2020

  1. Update Clippy testcases

    Update the test `redundant_pattern_matching`: check if `is_ok` and `is_err` are suggested within const contexts.
    Also removes the `redundant_pattern_matching_const_result` test, as it is no longer needed.
    CDirkx committed Sep 20, 2020
    Configuration menu
    Copy the full SHA
    ab4fa21 View commit details
    Browse the repository at this point in the history
  2. Remove can_suggest check for is_ok and is_err.

    `is_ok` and `is_err` are stabilized as const and can thus always be suggested.
    CDirkx committed Sep 20, 2020
    Configuration menu
    Copy the full SHA
    a59d480 View commit details
    Browse the repository at this point in the history
  3. Update src/tools/clippy/clippy_lints/src/matches.rs

    Co-authored-by: Ralf Jung <post@ralfj.de>
    CDirkx and RalfJung committed Sep 20, 2020
    Configuration menu
    Copy the full SHA
    bf70e21 View commit details
    Browse the repository at this point in the history