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

Update Clippy #108474

Merged
merged 139 commits into from
Feb 26, 2023
Merged

Update Clippy #108474

merged 139 commits into from
Feb 26, 2023

Commits on Feb 6, 2023

  1. Configuration menu
    Copy the full SHA
    c6692a8 View commit details
    Browse the repository at this point in the history
  2. bless tests

    pvdrz committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    8eac9e3 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2023

  1. Introduce -Zterminal-urls to use OSC8 for error codes

    Terminals supporting the OSC8 Hyperlink Extension can support inline
    anchors where the text is user defineable but clicking on it opens a
    browser to a specified URLs, just like `<a href="URL">` does in HTML.
    
    https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
    estebank committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    374c393 View commit details
    Browse the repository at this point in the history
  2. Add docs and update tests

    pvdrz committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    e2e23c0 View commit details
    Browse the repository at this point in the history
  3. update metadata

    pvdrz committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    cc19fbe View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2023

  1. Configuration menu
    Copy the full SHA
    179c037 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e7fe1f9 View commit details
    Browse the repository at this point in the history
  3. add AliasEq to PredicateKind

    BoxyUwU committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    cd3bcbb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    145e6a9 View commit details
    Browse the repository at this point in the history
  5. Add test.

    m-ou-se committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    5fefe8b View commit details
    Browse the repository at this point in the history
  6. Clarify description of suspicious_command_arg_space.

    Co-authored-by: Manish Goregaokar <manishsmail@gmail.com>
    m-ou-se and Manishearth committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    984c47b View commit details
    Browse the repository at this point in the history
  7. Update lints.

    m-ou-se committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    8f56767 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    078f149 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    805a0ae View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2023

  1. Auto merge of rust-lang#107507 - BoxyUwU:deferred_projection_equality…

    …, r=lcnr
    
    Implement `deferred_projection_equality` for erica solver
    
    Somewhat of a revival of rust-lang#96912. When relating projections now emit an `AliasEq` obligation instead of attempting to determine equality of projections that may not be as normalized as possible (i.e. because of lazy norm, or just containing inference variables that prevent us from resolving an impl). Only do this when the new solver is enabled
    bors committed Feb 11, 2023
    Configuration menu
    Copy the full SHA
    863e96d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8789b37 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2023

  1. Configuration menu
    Copy the full SHA
    d9dc167 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aeaa1cc View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#10330 - samueltardieu:10325, r=xFrednet

    cast_possible_truncation: issue proper help message
    
    Fixes rust-lang#10325
    
    ---
    
    changelog: Sugg: [`cast_possible_truncation`]: Corrected the lint name in help message
    [rust-lang#10330](rust-lang/rust-clippy#10330)
    <!-- changelog_checked-->
    bors committed Feb 12, 2023
    Configuration menu
    Copy the full SHA
    d880cae View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    21433ab View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#10333 - samueltardieu:lintcheck-clap-panic, r…

    …=flip1995
    
    lintcheck: fix clap panic
    
    clap 4.1.4 panics if `-` is used at the start of an argument:
    
    ```
    $ cargo lintcheck
    […]
    thread 'main' panicked at 'Argument recursive: long "--recursive" must not start with a `-`, that will be handled by the parser', /home/sam/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-4.1.4/src/builder/debug_asserts.rs:82:13
    ```
    
    changelog: none
    <!-- changelog_checked -->
    bors committed Feb 12, 2023
    Configuration menu
    Copy the full SHA
    ad2135e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    09d3097 View commit details
    Browse the repository at this point in the history
  7. Address comments

    c410-f3r committed Feb 12, 2023
    Configuration menu
    Copy the full SHA
    1b286b1 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e70a7a6 View commit details
    Browse the repository at this point in the history
  9. Address comment

    c410-f3r committed Feb 12, 2023
    Configuration menu
    Copy the full SHA
    1ed8ed3 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#10310 - c410-f3r:arith-2, r=Alexendoo

    [arithmetic_side_effects] Fix rust-lang#10209
    
    Fix rust-lang#10209
    
    ---
    
    changelog: Enhancement: [`arithmetic_side_effects`]: No longer lints, if safe constant values are used.
    [rust-lang#10310](rust-lang/rust-clippy#10310)
    <!-- changelog_checked -->
    bors committed Feb 12, 2023
    Configuration menu
    Copy the full SHA
    6f353fd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1f77866 View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#10317 - m-ou-se:suspicious-command-arg-space,…

    … r=Manishearth
    
    Add `suspicious_command_arg_space` lint
    
    Fixes rust-lang#10316
    
    ---
    
    changelog: New lint: [`suspicious_command_arg_space`]
    [rust-lang#10317](rust-lang/rust-clippy#10317)
    <!-- changelog_checked -->
    bors committed Feb 12, 2023
    Configuration menu
    Copy the full SHA
    298f139 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. Configuration menu
    Copy the full SHA
    ebca1b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e8e9c32 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    340d9e8 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#107838 - estebank:terminal_hyperlinks, r=na…

    …gisa
    
    Introduce `-Zterminal-urls` to use OSC8 for error codes
    
    Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML.
    
    https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
    matthiaskrgr authored Feb 13, 2023
    Configuration menu
    Copy the full SHA
    b3077fb View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#10177 - chansuke:almost_swapped, r=Alexendoo

    Almost swapped
    
    Take over from rust-lang/rust-clippy#8945
    
    Fix rust-lang/rust-clippy#8151
    
    ---
    
    changelog: enhancement: [`almost_swapped`]: Now detects almost swaps using `let` statements
    [rust-lang#10177](rust-lang/rust-clippy#10177)
    <!-- changelog_checked -->
    bors committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    ac60dca View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#107924 - eggyal:move_fold_visit_traits_to_typ…

    …e_lib_with_trait_alias, r=oli-obk
    
    Move folding & visiting traits into type library
    
    This is a rework of rust-lang#107712, following feedback on that PR.
    
    In particular, this version uses trait aliases to reduce the API churn for trait consumers.  Doing so requires a workaround for rust-lang#107747 until its fix in rust-lang#107803 is merged into the stage0 compiler; this workaround, which uses conditional compilation based on the `bootstrap` configuration predicate, sits in dedicated commit b409329 for ease of reversion.
    
    The possibility of the `rustc_middle` crate retaining its own distinct versions of each folding/visiting trait, blanket-implemented on all types that implement the respective trait in the type library, was also explored: however since this would necessitate making each `rustc_middle` trait a subtrait of the respective type library trait (so that such blanket implementations can delegate their generic methods), no benefit would be gained.
    
    r? types
    bors committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    42d4bd7 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#10334 - samueltardieu:book-warning-text, r=Ma…

    …nishearth
    
    book: move warning to the right place
    
    changelog: none
    bors committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    63562a6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4b8f112 View commit details
    Browse the repository at this point in the history
  9. Add question-mark-used lint

    This lint complains when the question mark operator (try operator)
    is used.  This is a restriction lint that can be useful on local
    scopes where a custom error handling macro is supposed to be used
    to augment the error based on local scope data before returning.
    mitsuhiko committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    89314a0 View commit details
    Browse the repository at this point in the history
  10. Remove useless call to combine_seq

    `combine_seq(x, NeverLoopResult::Otherwise)`  always returns `x`
    samueltardieu committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    c231b41 View commit details
    Browse the repository at this point in the history
  11. Replace combine_both by combine_seq

    All evaluations now happen in order.
    samueltardieu committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    1fec292 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. Configuration menu
    Copy the full SHA
    8e96ade View commit details
    Browse the repository at this point in the history
  2. Fix a bug in never_loop when anonymous blocks are nested in named blocks

    The following code
    
    ```
    loop {
        'a: {
            { }
            break 'a;
        }
    }
    ```
    
    was detected as a never-looping loop.
    samueltardieu committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    e9dffa3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e3a739a View commit details
    Browse the repository at this point in the history
  4. Ignore instructions following a break from block in never_loop lint

    It is not sufficient to ignore break from a block inside the loop.
    Instructions after the break must be ignored, as they are unreachable.
    This is also true for all instructions in outer blocks and loops
    until the right block is reached.
    samueltardieu committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    657ee48 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e4e5924 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#108007 - compiler-errors:str-less-kind, r=N…

    …ilstrieb
    
    Use `is_str` instead of string kind comparison
    
    Split out from rust-lang#107939
    matthiaskrgr authored Feb 14, 2023
    Configuration menu
    Copy the full SHA
    b8c3642 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#10311 - samueltardieu:issue-10304, r=Jarcho

    [never_loop] Fix rust-lang#10304
    
    It is not sufficient to ignore break from a block inside the loop. Instructions after the break must be ignored, as they are unreachable. This is also true for all instructions in outer blocks and loops until the right block is reached.
    
    Fixes rust-lang#10304
    
    ---
    
    changelog: FP: [`never_loop`]: No longer lints, for statements following break statements for outer blocks.
    [rust-lang#10311](rust-lang/rust-clippy#10311)
    <!-- changelog_checked-->
    bors committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    a182a67 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e41c373 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#108056 - matthiaskrgr:rollup-oa6bxvh, r=matth…

    …iaskrgr
    
    Rollup of 9 pull requests
    
    Successful merges:
    
     - rust-lang#107573 (Update the minimum external LLVM to 14)
     - rust-lang#107626 (Fix `x fix` on the standard library itself)
     - rust-lang#107673 (update ICU4X to 1.1.0)
     - rust-lang#107733 (Store metrics from `metrics.json` to CI PGO timer)
     - rust-lang#108007 (Use `is_str` instead of string kind comparison)
     - rust-lang#108033 (add an unstable `#[rustc_coinductive]` attribute)
     - rust-lang#108039 (Refactor refcounted structural_impls via functors)
     - rust-lang#108040 (Use derive attributes for uninteresting traversals)
     - rust-lang#108044 (interpret: rename Pointer::from_addr → from_addr_invalid)
    
    Failed merges:
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    5a8b288 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#10346 - samueltardieu:issue-10331, r=Manishearth

    Do not base map_entry lint suggestion on expanded code
    
    Fixes rust-lang#10331
    
    changelog: [`map_entry`]: do not base suggestion on code expanded by the compiler
    bors committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    0e40f94 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    17cb2e4 View commit details
    Browse the repository at this point in the history
  12. manual_let_else: let/else is not divergent by default

    The divergent `else` block of a `let`/`else` statement does not make
    the `let`/`else` statement itself divergent.
    samueltardieu committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    7f15a11 View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#10332 - samueltardieu:issue-10296, r=Alexendoo

    manual_let_else: let/else is not divergent by default
    
    The divergent `else` block of a `let`/`else` statement does not make the `let/else` statement itself divergent.
    
    Fixes rust-lang#10296
    
    changelog: [`manual_let_else`]: do not consider `let`/`else` to be divergent by default
    bors committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    4c28fdd View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Configuration menu
    Copy the full SHA
    8b93eb8 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#10328 - compiler-errors:fix-re-erased-in-need…

    …less_pass_by_value, r=matthiaskrgr
    
    Liberate late-bound regions rather than erasing them in `needless_pass_by_value`
    
    changelog: [`needless_pass_by_value`]: fixes an ICE when there are late-bound regions in function arguments that are needlessly passed by value
    
    Fixes rust-lang#107147
    r? `@matthiaskrgr`
    bors committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    e018a2c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    75aa2b9 View commit details
    Browse the repository at this point in the history
  4. Use target instead of machine for mir interpreter integer handling.

    The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform
    oli-obk committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    cecc45c View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#10345 - J-ZhengLi:issue_10049, r=xFrednet

    fix [`needless_return`] incorrect suggestion when returning if sequence
    
    fixes: rust-lang#10049
    
    ---
    
    changelog: [`needless_return`]: fix incorrect suggestion  on if sequence
    bors committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    d3d235d View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#10343 - samueltardieu:issue-10339, r=Alexendoo

    uninlined_format_args: do not inline argument with generic parameters
    
    Fix rust-lang#10339
    
    ---
    
    changelog: FP: [`uninlined_format_args`]: No longer lints for arguments with generic parameters
    [rust-lang#10343](rust-lang/rust-clippy#10343)
    <!-- changelog_checked -->
    bors committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    8754d5a View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#10321 - mkrasnitski:false-positives, r=flip1995

    Fix false positives for `extra_unused_type_parameters`
    
    Don't lint external macros. Also, if the function body is empty, any type parameters with bounds on them are not linted. Note that only the body needs be empty - this rule still applies if the function takes any arguments.
    
    fixes rust-lang#10318
    fixes rust-lang#10319
    changelog: none
    <!-- changelog_checked -->
    bors committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    595f783 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1ee4651 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#10338 - mkrasnitski:synthetic-params, r=flip1995

    Ignore synthetic type parameters for `extra_unused_type_parameters`
    
    There was a minor bug around calculating spans when forming the help message. An example:
    
    ```rust
    fn unused_opaque<A, B>(dummy: impl Default) {}
    //               ^^ ^
    ```
    
    In this case, the entire list of generics should be highlighted, instead of each individual parameter. The culprit is the `impl Default`, which registers as a type parameter but doesn't live within the `<...>`. Because synthetic parameters can't ever be manually created, we just ignore them for this lint.
    
    r? `@flip1995`
    changelog: none
    <!-- changelog_checked -->
    bors committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    5b6795f View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#108006 - cjgillot:def-impl, r=oli-obk

    Avoid accessing HIR when it can be avoided
    
    Experiment to see if it helps some incremental cases.
    
    Will be rebased once rust-lang#107942 gets merged.
    
    r? `@ghost`
    bors committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    30f38d6 View commit details
    Browse the repository at this point in the history
  11. Add impl_trait_param lint

    As this is a lint about "style", and a purely cosmetical choice (using `<A: Trait>` over `impl Trait`), a lot of other files needed to be allowed this lint.
    blyxyas committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    8ec9543 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#108047 - oli-obk:machine->🞋, r=RalfJung

    Use `target` instead of `machine` for mir interpreter integer handling.
    
    The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform. As per rust-lang#108029 (comment)
    
    r? `@RalfJung`
    matthiaskrgr authored Feb 15, 2023
    Configuration menu
    Copy the full SHA
    dd6534a View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ade4c9b View commit details
    Browse the repository at this point in the history
  14. Exec cargo dev update_lints

    blyxyas committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    6c9983b View commit details
    Browse the repository at this point in the history
  15. Tests pass

    blyxyas committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    bdf4fd3 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8a2245d View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    6aa06b7 View commit details
    Browse the repository at this point in the history
  18. Fix lint message

    blyxyas committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    4166b7d View commit details
    Browse the repository at this point in the history
  19. Remove commented code

    blyxyas committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    6ef34bf View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. Configuration menu
    Copy the full SHA
    27a4768 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f12b492 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#10353 - nindalf:master, r=llogiq

    Change unusual_byte_groupings to require byte groupings of equal size
    
    Fixes issue rust-lang#6556
    
    This lint required byte groupings of size 2 or 4 for `Radix::Binary` and `Radix::Hexadecimal`. Since there are good reasons for allowing groups of other sizes, this PR relaxes the restriction. This lint now requires that
    
    - group sizes after the first group be of the same size and
    - greater or equal in size to the first group.
    
    ---
    
    changelog: [`unusual_byte_groupings`]: reduce false positives by relaxing restriction requiring groups of specific sizes.
    bors committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    86fb33a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2d4d39d View commit details
    Browse the repository at this point in the history
  5. Added check for local spans

    mitsuhiko committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    0933798 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0b1ae20 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#10163 - c410-f3r:lock-1, r=llogiq

    [significant_drop_tightening] Add MVP
    
    cc rust-lang#9399
    
    Creates the lint with minimum functionalities, which is a good start IMO.
    
    ---
    
    changelog: new lint: [`significant_drop_tightening`]
    [rust-lang#10163](rust-lang/rust-clippy#10163)
    <!-- changelog_checked -->
    bors committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    4369a67 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#10356 - JirkaVebr:let_underscore_untyped, r=l…

    …logiq
    
    Add `let_underscore_untyped`
    
    Fixes rust-lang#6842
    
    This adds a new pedantic `let_underscore_untyped` lint which checks for `let _ = <expr>`, and suggests to either provide a type annotation, or to remove the `let` keyword. That way the author is forced to specify the type they intended to ignore, and thus get forced to re-visit the decision should the type of `<expr>` change. Alternatively, they can drop the `let` keyword to truly just ignore the value no matter what.
    
    r? `@llogiq`
    
    changelog: New lint: [let_underscore_untyped]
    bors committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    99d4ea4 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#10342 - mitsuhiko:feature/question-mark-used,…

    … r=Alexendoo
    
    Add question-mark-used lint
    
    This lint complains when the question mark operator (try operator) is used.  This is a restriction lint that can be useful on local scopes where a custom error handling macro is supposed to be used to augment the error based on local scope data before returning.
    
    Fixes rust-lang#10340
    
    ---
    
    changelog: New lint [`question_mark_used`]
    [rust-lang#10342](rust-lang/rust-clippy#10342)
    <!-- changelog_checked -->
    bors committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    52c8b53 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9c9dbc2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6d0df84 View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#10360 - JirkaVebr:transmute_integer_to_non_ze…

    …ro_wrapper, r=llogiq
    
    Add the `transmute_int_to_non_zero` lint
    
    Fixes rust-lang#10288
    
    This adds a new complexity lint `transmute_int_to_non_zero` which checks for transmutes to any of the `NonZero*` types, and suggests their `new_unchecked` method instead.
    
    r? `@llogiq`
    
    changelog: New lint: [`transmute_int_to_non_zero`]
    bors committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    dfe23dc View commit details
    Browse the repository at this point in the history
  13. remove empty file

    pvdrz committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    64b8aaf View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    7e53e27 View commit details
    Browse the repository at this point in the history
  15. Auto merge of rust-lang#10357 - nindalf:doc_markdown_relax, r=llogiq

    Stop doc_markdown requiring backticks on links to external websites
    
    Fixes rust-lang#10302
    
    This lint currently checks that any link should be enclosed with `backticks` if the title looks like a lang item. This PR changes the lint to only run on internal links. External links, indicated by `http` or `https`, are skipped.
    
    This PR also reorganises `pulldown_cmark` imports to bypass the clippy lint enforcing 100 line functions.
    
    ---
    
    changelog: Stop doc_markdown requiring backticks on links to external websites
    bors committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    be74773 View commit details
    Browse the repository at this point in the history
  16. Auto merge of rust-lang#10361 - nindalf:nth_bytes_copy, r=llogiq

    Stop bytes_nth from suggesting code that does not compile
    
    Fixes rust-lang#10151
    
    As discussed in the issue, this PR changes the lint in 2 ways
    
    1. Replace `bytes().nth(n).unwrap()` with `as_bytes()[n]`
    2. Replace other `bytes().nth(n)` with `as_bytes().get(n).copied()`
    
    ---
    
    changelog: Stop bytes_nth from suggesting code that does not compile in some cases
    bors committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    eac0bd9 View commit details
    Browse the repository at this point in the history
  17. Auto merge of rust-lang#10336 - samueltardieu:issue-10241, r=llogiq

    manual_let_else: do not suggest semantically different replacements
    
    The problem is that this lint does not consider the possibility that the divergent branch can come first and that the patterns may overlap. This led to incorrect suggestions, previously registered as correct in the tests themselves:
    
    ```rust
    let v = match build_enum() {
        _ => continue,
        Variant::Bar(v) | Variant::Baz(v) => v,
    };
    ```
    
    had a `let Variant::Bar(v) | Variant::Baz(v) = v else { continue; }` suggestion, which is obviously wrong as the original code `continue`s in any case. Issue rust-lang#10241 gives another example.
    
    The code now checks that the divergent branch comes second. It could be extended later (I've added a TODO) to check for non-overlapping patterns.
    
    Fixes rust-lang#10241.
    
    changelog: [`manual_let_else`] do not suggest non equivalent replacements in `match`
    bors committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    6444621 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    747f81e View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#107489 - compiler-errors:non_lifetime_binde…

    …rs, r=cjgillot
    
    Implement partial support for non-lifetime binders
    
    This implements support for non-lifetime binders. It's pretty useless currently, but I wanted to put this up so the implementation can be discussed.
    
    Specifically, this piggybacks off of the late-bound lifetime collection code in `rustc_hir_typeck::collect::lifetimes`. This seems like a necessary step given the fact we don't resolve late-bound regions until this point, and binders are sometimes merged.
    
    Q: I'm not sure if I should go along this route, or try to modify the earlier nameres code to compute the right bound var indices for type and const binders eagerly... If so, I'll need to rename all these queries to something more appropriate (I've done this for `resolve_lifetime::Region` -> `resolve_lifetime::ResolvedArg`)
    
    cc rust-lang/types-team#81
    
    r? `@ghost`
    matthiaskrgr authored Feb 16, 2023
    Configuration menu
    Copy the full SHA
    cc60e21 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. Configuration menu
    Copy the full SHA
    f0565c9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    98c4a49 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#107753 - kylematsuda:type-of, r=BoxyUwU

    Switch to `EarlyBinder` for `type_of` query
    
    Part of the work to finish rust-lang#105779 and implement rust-lang/types-team#78.
    
    Several queries `X` have a `bound_X` variant that wraps the output in `EarlyBinder`. This adds `EarlyBinder` to the return type of the `type_of` query and removes `bound_type_of`.
    
    r? `@lcnr`
    bors committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    9554045 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8a66a68 View commit details
    Browse the repository at this point in the history
  5. Replace mk_foo calls with infer_foo where possible.

    There are several `mk_foo`/`intern_foo` pairs, where the former takes an
    iterator and the latter takes a slice. (This naming convention is bad,
    but that's a fix for another PR.)
    
    This commit changes several `mk_foo` occurrences into `intern_foo`,
    avoiding the need for some `.iter()`/`.into_iter()` calls. Affected
    cases:
    - mk_type_list
    - mk_tup
    - mk_substs
    - mk_const_list
    nnethercote committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    ae12b72 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a3837c6 View commit details
    Browse the repository at this point in the history
  7. Address review comments

    pvdrz committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    c29e767 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2023

  1. Auto merge of rust-lang#108112 - nnethercote:clarify-iterator-interne…

    …rs, r=oli-obk,compiler-errors
    
    Clarify iterator interners
    
    I found the iterator interners very confusing. This PR clarifies things.
    
    r? `@compiler-errors`
    bors committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    c0373f5 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#10363 - c410-f3r:lock-1, r=xFrednet

    [significant_drop_tightening] Ignore inexpensive statements
    
    Not all statements that follow the last use of a lock guard are expensive and can therefore be ignored by the lint.
    
    ```rust
    pub fn foo() -> i32 {
        let mutex = Mutex::new(1);
        let lock = mutex.lock().unwrap();
        let rslt = *lock;
        let another = rslt;
       another
    }
    ```
    
    ---
    
    changelog: [`significant_drop_tightening`]: No longer lints for inexpensive statements after the lock guard
    [rust-lang#10363](rust-lang/rust-clippy#10363)
    <!-- changelog_checked -->
    bors committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    e1da002 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7518969 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#10368 - c410-f3r:lock-1, r=xFrednet

    [significant_drop_tightening] Evaluate the return expression of a block
    
    For whatever reason, the return expression of a block is not contained inside the slice of statements and because of that the lint wasn't evaluating things that could potentially block the release of a lock.
    
    ```rust
    pub fn example() -> i32 {
        let mutex = Mutex::new(1);
        let lock = mutex.lock().unwrap();
        let _ = *lock;
        let _ = *lock;
       do_heavy_computation_that_takes_time_and_returns_i32()
    }
    ```
    
    ---
    
    changelog: none
    <!-- changelog_checked -->
    bors committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    85d4b5a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    89fde4a View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2023

  1. Configuration menu
    Copy the full SHA
    0905838 View commit details
    Browse the repository at this point in the history
  2. Box::default(): do not omit the type of the removed trait object

    Within a larger expression, when the type of `Box::new(T::default())` is
    `Box<dyn Trait>`, the concrete type `T` cannot be omitted in the
    proposed replacement `Box::<T>::default()`.
    samueltardieu committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    92c403c View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#10382 - samueltardieu:issue-10381, r=llogiq

    Box::default(): do not omit the type of the removed trait object
    
    Within a larger expression, when the type of `Box::new(T::default())` is `Box<dyn Trait>`, the concrete type `T` cannot be omitted in the proposed replacement `Box::<T>::default()`.
    
    Fixes rust-lang#10381
    
    changelog: [`box_default`]: in case of a trait object do not omit the concrete type name
    bors committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    574c8ae View commit details
    Browse the repository at this point in the history
  4. Update documentation

    pvdrz committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    790f28b View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#10303 - pvdrz:pub_crate_missing_docs, r=giraf…

    …fate
    
    Add configuration to lint missing docs of `pub(crate)` items
    
    Fixes this: rust-lang/rust-clippy#5736 (comment)
    
    TODO:
    - [x] Needs docs
    - [x] Needs better names
    - [x] Should `pub` items be checked to when this new option is enabled? I'm saying no because `missing_docs` already exists
    
    `@flip1995` I'd like to get some input from you :)
    
    ---
    
    changelog: Enhancement: [`missing_docs_in_private_items`]: Added new configuration `missing-docs-in-crate-items` to lint on items visible within the current crate. For example, `pub(crate)` items.
    [rust-lang#10303](rust-lang/rust-clippy#10303)
    <!-- changelog_checked -->
    bors committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    b1cf1e7 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2023

  1. Use ThinVec in various AST types.

    This commit changes the sequence parsers to produce `ThinVec`, which
    triggers numerous conversions.
    nnethercote committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    71b8646 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#10197 - blyxyas:impl_trait_param, r=Jarcho

    Add `impl_trait_in_params` lint
    
    As this is a lint about style, and using `impl Trait` is purely cosmetical (even with downsides), a lot of unrelated files needed to allow this lint.
    
    ---
    
    Resolves rust-lang#10030
    
    changelog: New lint: [`impl_trait_in_params`]
    [10197](rust-lang/rust-clippy#10197)
    <!-- changelog_checked -->
    bors committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    5ef3cc8 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#10380 - Alexendoo:needless-lifetime-macro-exp…

    …ansion, r=xFrednet
    
    Ignore lifetimes from differing contexts in `needless_lifetimes`
    
    Fixes rust-lang#10379
    
    changelog: [`needless_lifetimes`]: Don't lint signatures in macros if the lifetime is a metavariable
    bors committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    803ce88 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0aad34e View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#10386 - Jarcho:issue_10384, r=Manishearth

    Normalize projections types when checking `explicit_auto_deref`
    
    fixes rust-lang#10384
    
    changelog: [`explicit_auto_deref`]: Better consider projection types when checking if auto deref is applicable
    bors committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    5166882 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2023

  1. Configuration menu
    Copy the full SHA
    bf7c209 View commit details
    Browse the repository at this point in the history
  2. errors: generate typed identifiers in each crate

    Instead of loading the Fluent resources for every crate in
    `rustc_error_messages`, each crate generates typed identifiers for its
    own diagnostics and creates a static which are pulled together in the
    `rustc_driver` crate and provided to the diagnostic emitter.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    aa0e543 View commit details
    Browse the repository at this point in the history
  3. various: translation resources from cg backend

    Extend `CodegenBackend` trait with a function returning the translation
    resources from the codegen backend, which can be added to the complete
    list of resources provided to the emitter.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    ab69a2a View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#10385 - Jarcho:readme_restriction, r=xFrednet

    Update readme description of `restriction` lints to dissuade casual use.
    
    Adds some stronger wording about not enabling `restriction` lints. I've seen it come up a few times where people are confused about what the `restriction` category is for and end up casually enabling lints from it (or the whole category).
    
    changelog: None
    bors committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    8d08917 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    72e773f View commit details
    Browse the repository at this point in the history
  6. correct comments

    ldm0 committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    b9c617a View commit details
    Browse the repository at this point in the history
  7. Recover tests

    ldm0 committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    1a474d9 View commit details
    Browse the repository at this point in the history
  8. fix fmt

    ldm0 committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    a5acb92 View commit details
    Browse the repository at this point in the history
  9. bless

    ldm0 committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    79a9024 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d254516 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    430c4ab View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#108340 - eggyal:remove_traversal_trait_aliase…

    …s, r=oli-obk
    
    Remove type-traversal trait aliases
    
    rust-lang#107924 moved the type traversal (folding and visiting) traits into the type library, but created trait aliases in `rustc_middle` to minimise both the API churn for trait consumers and the arising boilerplate.  As mentioned in that PR, an alternative approach of defining subtraits with blanket implementations of the respective supertraits was also considered at that time but was ruled out as not adding much value.
    
    Unfortunately, it has since emerged that rust-analyzer has difficulty with these trait aliases at present, resulting in a degraded contributor experience (see the recent [r-a has become useless](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/r-a.20has.20become.20useless) topic on the #t-compiler/help Zulip stream).
    
    This PR removes the trait aliases, and accordingly the underlying type library traits are now used directly; they are parameterised by `TyCtxt<'tcx>` rather than just the `'tcx` lifetime, and imports have been updated to reflect the fact that the trait aliases' explicitly named traits are no longer automatically brought into scope.  These changes also roll-back the (no-longer required) workarounds to rust-lang#107747 that were made in b409329.
    
    Since this PR is just a find+replace together with the changes necessary for compilation & tidy to pass, it's currently just one mega-commit.  Let me know if you'd like it broken up.
    
    r? `@oli-obk`
    bors committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    95cd528 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2023

  1. Auto merge of rust-lang#108324 - notriddle:notriddle/assoc-fn-method,…

    … r=compiler-errors,davidtwco,estebank,oli-obk
    
    diagnostics: if AssocFn has self argument, describe as method
    
    Discussed in https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.22associated.20function.22.20vs.20.22method.22/near/329265515
    
    This commit also changes the tooltips on rustdoc intra-doc links targeting methods.
    
    For anyone not sure why this is being done, see the Reference definitions of these terms in <https://doc.rust-lang.org/1.67.1/reference/items/associated-items.html#methods>
    
    > Associated functions whose first parameter is named `self` are called methods and may be invoked using the [method call operator](https://doc.rust-lang.org/1.67.1/reference/expressions/method-call-expr.html), for example, `x.foo()`, as well as the usual function call notation.
    
    In particular, while this means it's technically correct for rustc to refer to a method as an associated function (and there are a few cases where it'll still do so), rustc *must never* use the term "method" to refer to an associated function that does not have a `self` parameter.
    bors committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    daa94d2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    528bb63 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#10392 - mkrasnitski:false-positives, r=Jarcho

    Fix more false positives for `extra_unused_type_parameters`
    
    Builds on rust-lang#10321. All empty functions are no longer linted, instead of just those that have trait bounds on them. Also, if a trait bound contains a non-public trait (un-exported, but still potentially reachable), then the corresponding type parameter isn't linted.
    
    Finally, added support for the `avoid_breaking_exported_api` config option.
    
    r? `@flip1995`
    changelog: none
    bors committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    f9adb83 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    00c294a View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#10369 - nindalf:no_mangle_lint, r=llogiq

    Add new lint no_mangle_with_rust_abi
    
    Fixes issue rust-lang#10347
    
    This PR adds a new lint `no_mangle_with_rust_abi` that suggests converting a function to the C ABI to if the function has the `#[no_mangle]` attribute and `Abi == Abi::Rust`. It will not run for any of the other variants defined in [rustc_target::spec::abi::Abi](https://doc.rust-lang.org/beta/nightly-rustc/rustc_target/spec/abi/enum.Abi.html), nor suggest any conversion other than conversion to the C ABI.
    
    Functions that explicitly opt into the Rust ABI with `extern "Rust"` are ignored by this lint.
    
    ---
    
    changelog: [`no_mangle_with_rust_abi`]: add lint that converts Rust ABI functions with the `#[no_mangle]` attribute to C ABI
    bors committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    659112c View commit details
    Browse the repository at this point in the history
  6. run cargo collect-metadata

    ldm0 committed Feb 23, 2023
    Configuration menu
    Copy the full SHA
    84ceca8 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2023

  1. Auto merge of rust-lang#10391 - ldm0:ldm0_fix_unwrap_in_tests, r=xFre…

    …dnet
    
    Fix test function checker in `unwrap_used`, `expect_used`
    
    After rust-lang#9686 , `unwrap` and `expect` in integration tests and raw test functions won't be allowed.
    
    fixes rust-lang#10011
    fixes rust-lang#10238
    fixes rust-lang#10264
    
    ---
    
    changelog: Fix: [`expect_used`], [`unwrap_used`], [`dbg_macro`], [`print_stdout`], [`print_stderr`]: No longer lint in test functions, if the related configuration is set
    [rust-lang#10391](rust-lang/rust-clippy#10391)
    <!-- changelog_checked -->
    bors committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    b528cc9 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2023

  1. Configuration menu
    Copy the full SHA
    bc184e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5552f4a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64775f3 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#10401 - samueltardieu:issue-10148, r=Alexendoo

    Do not panic when analyzing the malformed origin of a format string
    
    Fixes rust-lang#10148. This will trigger only when generating format strings while accepting weird things in a procedural macro and setting the span to something which is not a string.
    
    changelog: none
    bors committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    5155119 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e825adf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    69c4ff6 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#10402 - Jarcho:rustup, r=Jarcho

    Rustup
    
    Looks like `@flip1995`  is busy.
    
    r? `@ghost`
    
    changelog: None
    bors committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    149392b View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2023

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