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 5 pull requests #94987

Merged
merged 12 commits into from
Mar 16, 2022
Merged

Rollup of 5 pull requests #94987

merged 12 commits into from
Mar 16, 2022

Commits on Mar 11, 2022

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

Commits on Mar 15, 2022

  1. Configuration menu
    Copy the full SHA
    896b113 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7da07ff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    261d5fc View commit details
    Browse the repository at this point in the history
  4. Extend the irrefutable_let_patterns lint to let chains

    Only look for complete suffixes or prefixes of irrefutable let patterns, so
    that an irrefutable let pattern in a chain surrounded by refutable ones is
    not linted, as it is an useful pattern.
    est31 committed Mar 15, 2022
    Configuration menu
    Copy the full SHA
    0f4c81a View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2022

  1. Configuration menu
    Copy the full SHA
    ac5c657 View commit details
    Browse the repository at this point in the history
  2. changed wording

    Dylan-DPC authored Mar 16, 2022
    Configuration menu
    Copy the full SHA
    2c06c86 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#94868 - dtolnay:noblock, r=Dylan-DPC

    Format core and std macro rules, removing needless surrounding blocks
    
    Many of the asserting and printing macros in `core` and `std` are written with prehistoric-looking formatting, like this:
    
    https://github.com/rust-lang/rust/blob/335ffbfa547df94ac236f5c56130cecf99c8d82b/library/std/src/macros.rs#L96-L101
    
    In modern Rust style this would conventionally be written as follows instead, always using braces and a trailing semicolon on the macro arms:
    
    https://github.com/rust-lang/rust/blob/af53809c874e0afb7be966df4d3cfcaa05277c53/library/std/src/macros.rs#L98-L105
    
    Getting rid of the unneeded braces inside the expansion reduces extraneous indentation in macro-expanded code. For example:
    
    ```rust
    println!("repro {}", true);
    ```
    
    ```rust
    // before:
    
    {
        ::std::io::_print(
            ::core::fmt::Arguments::new_v1(
                &["repro ", "\n"],
                &[::core::fmt::ArgumentV1::new_display(&true)],
            ),
        );
    };
    ```
    
    ```rust
    // after:
    
    ::std::io::_print(
        ::core::fmt::Arguments::new_v1(
            &["repro ", "\n"],
            &[::core::fmt::ArgumentV1::new_display(&true)],
        ),
    );
    ```
    Dylan-DPC authored Mar 16, 2022
    Configuration menu
    Copy the full SHA
    f986c74 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#94951 - est31:irrefutable_let_chain_pattern…

    …s, r=estebank
    
    Extend the irrefutable_let_patterns lint to let chains
    
    Implements the suggestion from rust-lang#94927 (comment)
    
    We only look for complete suffixes or prefixes of irrefutable let patterns, so
    that an irrefutable let pattern in a chain surrounded by refutable ones is
    not linted, as it is an useful pattern that has no low-cost replacement (unlike suffixes or prefixes which can just be copied outside of the `if`: either into the `if`'s block, or the block surrounding the `if`).
    If all patterns in a let chain are irrefutable, we lint as well.
    
    Depends on rust-lang#94958 ~~so I included it into the PR for now~~ *which has been merged since*.
    
    r? `@estebank`
    
    cc `@joshtriplett` `@c410-f3r`
    Dylan-DPC authored Mar 16, 2022
    Configuration menu
    Copy the full SHA
    2bd5c44 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#94955 - TaKO8Ki:use-format-args-capture-in-…

    …rustc-parse, r=Dylan-DPC
    
    Refactor: Use `format_args_capture` in some parts of `rustc_parse`
    Dylan-DPC authored Mar 16, 2022
    Configuration menu
    Copy the full SHA
    35bce11 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#94957 - iamzhangyong:explanation-read_line,…

    … r=Dylan-DPC
    
    Improve the explanation about the behaviour of read_line
    
    Close issue like rust-lang/book#2574
    Dylan-DPC authored Mar 16, 2022
    Configuration menu
    Copy the full SHA
    0732ea2 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#94974 - c410-f3r:let-chain-dashufwrqwemkf-l…

    …et-else, r=joshtriplett
    
    Ensure that `let_else` does not interact with `let_chains`
    
    As requested on rust-lang#94927.
    
    cc `@joshtriplett` `@estebank`
    Dylan-DPC authored Mar 16, 2022
    Configuration menu
    Copy the full SHA
    aaf2255 View commit details
    Browse the repository at this point in the history