about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-04-10Fix CIblyxyas-1/+1
2023-04-10Add "Lint Passes" chapterblyxyas-0/+136
2023-04-09Auto merge of #10618 - KisaragiEffective:patch-2, r=llogiqbors-0/+1
[missing_const_for_fn] fix #7121 *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: [`missing_const_for_fn`] note about removing const may break compatibility fix #7121
2023-04-09Auto merge of #10610 - beetrees:max-line-length, r=Jarchobors-0/+1
Add `max_line_length` to `.editorconfig`, matching `rustfmt.toml` Add `max_line_length` to `.editorconfig` to match the `max_width` in `rustfmt.toml`. changelog: none
2023-04-10apply code review suggestionKisaragi-1/+1
Co-authored-by: llogiq <bogusandre@gmail.com>
2023-04-10[missing_const_for_fn] fix #7121Kisaragi-0/+1
2023-04-08Auto merge of #10605 - blyxyas:book-type_checking, r=llogiqbors-0/+145
Clippy Book Chapter Updates Reborn: Type Checking This PR adds a new chapter to the book: "Type Checking", it hasn't changed a lot from the source mainly because there wasn't many reviews on it and I haven't see a lot of things that needed a change. ## Notes - I have some doubts about the whole "`is_*` Usage" section, what do you think about it. - For discussion about the whole project, please use the tracking issue for the project #10597 (It also contains a timeline, discussions, and more information) changelog: Add a new "Type Checking" chapter to the book r? `@flip1995`
2023-04-08Add "`hir::Ty` and `ty::Ty`" sectionblyxyas-0/+18
2023-04-08Add `max_line_length` to `.editorconfig`, matching `rustfmt.toml`beetrees-0/+1
2023-04-07Auto merge of #10604 - blyxyas:fix-book_broken_links, r=flip1995bors-2/+2
(Small) Fix broken links for Rust merge rust-lang/rust#110003's CI is [currently broken](https://github.com/rust-lang/rust/actions/runs/4628510374/jobs/8187672234?pr=110003) because of broken links. This PR fixes that. It was tested against `lintcheck` and found another broken link in `usage.md` (apart from CI's broken links) changelog:Fix broken links in the book Sorry for putting more work on you, but you're the one doing the Rust PR r? `@flip1995`
2023-04-07Auto merge of #10497 - y21:outer_doc_comment_bang, r=dswijbors-0/+427
new lint: suspicious_doc_comments Fixes #10485. This PR adds a new lint (`suspicious_doc_comments`) that triggers when the user writes `///!` or `/**!`. This is almost certainly a mistake and the user probably meant to write an inner doc comment (`//!`, `/*!`) to document the module or crate that this comment is contained in. changelog: [`suspicious_doc_comments`]: new lint
2023-04-07New chapter: "Type Checking"blyxyas-0/+127
2023-04-07new lint: suspicious_doc_commentsy21-0/+427
2023-04-07Auto merge of #10601 - schubart:manual_slice_size_calculation, r=llogiqbors-0/+184
Add [`manual_slice_size_calculation`] Fixes: #10518 --- changelog: new lint [`manual_slice_size_calculation`]
2023-04-07Auto merge of #10566 - ebobrow:iss10549, r=giraffatebors-15/+60
fix `single_component_path_imports` FP on `self::<import>::..` fixes #10549 I noticed that a couple functions in the file I was working on took `cx` as a parameter but didn't use them, so I removed that. Can revert if desired because it isn't related to my changes. changelog: [`single_component_path_imports`] don't suggest removing import when it is used as `self::<import>::..`
2023-04-07Fix false negatives by using `expr_or_init`Michael Schubart-8/+35
2023-04-06Fix broken links for Rust mergeblyxyas-2/+2
2023-04-06Auto merge of #10594 - J-ZhengLi:issue9824, r=Jarchobors-44/+121
fix [`mem_replace_option_with_none`] not considering field variables fixes: #9824 --- changelog: fix [`mem_replace_option_with_none`] not considering field variables
2023-04-06Add tests suggested by @llogiqMichael Schubart-0/+6
2023-04-06Add [`manual_slice_size_calculation`]Michael Schubart-0/+151
2023-04-06Auto merge of #10602 - flip1995:rustup, r=flip1995bors-36/+63
Rustup r? `@ghost` changelog: none
2023-04-06Bump nightly version -> 2023-04-06Philipp Krones-1/+1
2023-04-06Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-1642/+3026
2023-04-06fix [mem_replace_option_with_none] not considering field variablesJ-ZhengLi-44/+121
2023-04-05Auto merge of #10554 - samueltardieu:redundant-async-block, r=Jarchobors-151/+338
Make redundant_async_block a more complete late pass This lets us detect more complex situations: `async { x.await }` is simplified into `x` if: - `x` is an expression without side-effect - or `x` is an `async` block itself In both cases, no part of the `async` expression can be part of a macro expansion. Fixes #10509. Fixes #10525. changelog: [`redundant_async_block`] Do not lint expressions with side effects.
2023-04-05Make redundant_async_block a more complete late passSamuel "Sam" Tardieu-151/+338
This lets us detect more complex situations: `async { x.await }` is simplified into `x` if: - `x` is an expression without side-effect - or `x` is an async block itself In both cases, no part of the `async` expression can be part of a macro expansion.
2023-04-04Rename `ast::Static` to `ast::StaticItem` to match `ast::ConstItem`Oli Scherer-3/+3
2023-04-04box a bunch of large typesOli Scherer-5/+5
2023-04-04Auto merge of #10543 - blyxyas:tests_outside_test_module, r=flip1995bors-0/+104
Add `tests_outside_test_module` lint Adds `tests_outside_test_module` from #10506. This PR **doesn't** close the issue, just resolves task 1. changelog: [`tests_outside_test_module`]: The lint has been added
2023-04-04Split out ast::ItemKind::Const into its own structOli Scherer-4/+4
2023-04-04rust-analyzer guided tuple field to named fieldOli Scherer-2/+2
2023-04-04rust-analyzer guided enum variant structificationOli Scherer-3/+3
2023-04-04Fix formatting and lint descriptionblyxyas-7/+5
2023-04-04Auto merge of #10592 - beetrees:parent-dir-bug-fix, r=giraffatebors-1/+2
Fix bug with getting parent directories in `lookup_conf_file` Currently `lookup_conf_file` doesn't canonicalize the configuration directory before using [`PathBuf::pop`](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.pop) to get the parent directory. This isn't usually an issue when clippy is invoked via `cargo clippy` as `CARGO_MANIFEST_DIR` is already canonicalized. However, this currently causes `clippy-driver` to ignore any `clippy.toml` in any parent directories when `CARGO_MANIFEST_DIR` and `CLIPPY_CONF_DIR` are not set. changelog: Fix a bug that would cause parent directories not to be searched for `clippy.toml` when using `clippy-driver` directly.
2023-04-04Auto merge of #10589 - blyxyas:fix-double_must_use, r=giraffatebors-4/+35
Mini-fix `double_must_use` for async functions From Rust 1.67 onwards, the `#[must_use]` attribute also applies to the `Future::Output` (rust-lang/rust#100633). So the lint `double_must_use` was linting all async functions. This PR changes the `double_must_use` lint so it ignores `async` functions. --- Closes #10486 changelog: [`double_must_use`]: Fix false positive in async function
2023-04-03Remove check for `#[cfg(test)]`blyxyas-33/+5
2023-04-03Fix bug with getting parent directories in `lookup_conf_file`bhould287-1/+2
2023-04-03Auto merge of #10591 - beetrees:warnings-not-eprintln, r=flip1995bors-17/+24
Show multiple clippy.toml warnings with `sess.warn` instead of `eprintln!` Use `sess.warn` to display the multiple clippy.toml warning instead of `eprintln!`. changelog: none
2023-04-03Fix false negative on `Result<(), ()>`blyxyas-2/+20
2023-04-03Show multiple clippy.toml warnings with `sess.warn` instead of `eprintln!`bhould287-17/+24
2023-04-03only focus on `double_must_use` + Add `Result<(), ()>` testblyxyas-8/+14
2023-04-03Auto merge of #10229 - danielparks:doc-feature-cargo-clippy, r=flip1995bors-0/+21
Document `cargo-clippy` feature It is possible to use conditional compilation to prevent Clippy from evaluating certain code at all. Unfortunately, it was no longer documented anywhere. This adds a brief explanation of how to use the feature with conditional compilation, and mentions a few downsides. Fixes #10220 — Ability to skip files or blocks entirely changelog: none <!-- changelog_checked -->
2023-04-03Auto merge of #10574 - jyn514:update-docs, r=flip1995bors-3/+2
Update subtree sync docs for changes in rustc-dev-guide Companion PR to https://github.com/rust-lang/rustc-dev-guide/pull/1653. That still keeps a `contributing.html` with an "External Contributions" section, so hopefully it won't be too disruptive. changelog: none
2023-04-03Fix `double_must_use` for async functionsblyxyas-3/+10
2023-04-02Auto merge of #10588 - blyxyas:fix-allow_nonminimal_bool, r=llogiqbors-18/+39
Fix `nonminimal_bool` `#[allow]` attributes. Closes #10435 changelog: [`nonminimal_bool`]: Fix false-positive where the lint ignore `#[allow]` attributes. r? `@llogiq`
2023-04-02Auto merge of #10563 - nyurik:handle-all-fmt2, r=llogiqbors-35/+239
Partial no-op refactoring of #9948 This contains some prep work for #9948 to keep that change to the minimum, and make it easier to review it. This should be a noop, but it has some tests from that PR discussion, and should help in the future with the corner case format handling. cc: `@Alexendoo` `@llogiq` `@xFrednet` as the 3 people who reviewed the parent PR ---- changelog: none
2023-04-02Auto merge of #10585 - c410-f3r:aaaaaaaaaaaa, r=Jarchobors-3/+27
[arithmetic_side_effects] Fix #10583 Fixes #10583 ``` changelog: [`arithmetic_side_effects`]: Correctly handle division and module when the right-hand-side is unknown ```
2023-04-02Fix `nonminimal_bool` `#[allow]` attributes.blyxyas-18/+39
2023-04-02[arithmetic_side_effects] Fix #10583Caio-3/+27
2023-04-02Add `tests_outside_test_module` lintblyxyas-0/+134