about summary refs log tree commit diff
path: root/clippy_lints/src/mutable_debug_assertion.rs
AgeCommit message (Collapse)AuthorLines
2025-02-20Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-4/+0
2025-02-17Overhaul the `intravisit::Map` trait.Nicholas Nethercote-2/+2
First of all, note that `Map` has three different relevant meanings. - The `intravisit::Map` trait. - The `map::Map` struct. - The `NestedFilter::Map` associated type. The `intravisit::Map` trait is impl'd twice. - For `!`, where the methods are all unreachable. - For `map::Map`, which gets HIR stuff from the `TyCtxt`. As part of getting rid of `map::Map`, this commit changes `impl intravisit::Map for map::Map` to `impl intravisit::Map for TyCtxt`. It's fairly straightforward except various things are renamed, because the existing names would no longer have made sense. - `trait intravisit::Map` becomes `trait intravisit::HirTyCtxt`, so named because it gets some HIR stuff from a `TyCtxt`. - `NestedFilter::Map` assoc type becomes `NestedFilter::MaybeTyCtxt`, because it's always `!` or `TyCtxt`. - `Visitor::nested_visit_map` becomes `Visitor::maybe_tcx`. I deliberately made the new trait and associated type names different to avoid the old `type Map: Map` situation, which I found confusing. We now have `type MaybeTyCtxt: HirTyCtxt`.
2024-10-03Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into ↵Philipp Krones-1/+1
clippy-subtree-update
2024-09-25Fix `clippy_lints` and `clippy_utils`Samuel Moelius-1/+1
2024-09-24Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into ↵Philipp Krones-1/+1
clippy-subtree-update
2024-09-22FormattingPhilipp Krones-1/+1
2024-04-01fix fallout from previous commity21-1/+1
2024-04-04Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into ↵Philipp Krones-1/+1
clippy-subtree-update
2023-12-01Merge commit 'f0cdee4a3f094416189261481eae374b76792af1' into clippy-subtree-syncPhilipp Krones-1/+1
2023-11-25Use absolute path for `declare_tool_lint` in `declare_clippy_lint`Alex Macleod-1/+1
2023-07-17Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyupPhilipp Krones-2/+6
2023-07-14Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-6/+6
2022-10-06Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyupPhilipp Krones-4/+1
2022-09-23Apply uninlined_format-args to clippy_lintsYuri Astrakhan-4/+1
This change is needed for the uninlined_format-args lint to be merged. See https://github.com/rust-lang/rust-clippy/pull/9233
2022-06-04Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyupPhilipp Krones-2/+5
2022-06-01Combine doc examplesSerial-2/+5
2022-05-21Merge 'rust-clippy/master' into clippyupxFrednet-1/+1
2022-05-13Tweak some words improved representationydah-1/+1
This PR has implemented improved representation. - Use "lib" instead of "lifb" - Use "triggered" instead of "triggere" - Use "blacklisted_name" instead of "blackisted_name" - Use "stabilization" instead of "stabilisation" - Use "behavior" instead of "behaviour" - Use "target" instead of "tartet" - Use "checked_add" instead of "chcked_add" - Use "anti-pattern" instead of "antipattern" - Use "suggestion" instead of "suggesttion" - Use "example" instead of "exampel" - Use "Cheat Sheet" instead of "Cheatsheet"
2022-01-27Merge remote-tracking branch 'upstream/master' into rustupflip1995-4/+0
2022-01-16Fix Visitor::NestedFilter in ClippyCameron Steffen-5/+5
2022-01-13Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyupflip1995-19/+23
2022-01-04New macro utilsbors-19/+23
changelog: none Sorry, this is a big one. A lot of interrelated changes and I wanted to put the new utils to use to make sure they are somewhat battle-tested. We may want to divide some of the lint-specific refactoring commits into batches for smaller reviewing tasks. I could also split into more PRs. Introduces a bunch of new utils at `clippy_utils::macros::...`. Please read through the docs and give any feedback! I'm happy to introduce `MacroCall` and various functions to retrieve an instance. It feels like the missing puzzle piece. I'm also introducing `ExpnId` from rustc as "useful for Clippy too". `@rust-lang/clippy` Fixes #7843 by not parsing every node of macro implementations, at least the major offenders. I probably want to get rid of `is_expn_of` at some point.
2021-12-06Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyupflip1995-0/+1
2021-11-10Added `clippy::version` attribute to all normal lintsxFrednet-0/+1
So, some context for this, well, more a story. I'm not used to scripting, I've never really scripted anything, even if it's a valuable skill. I just never really needed it. Now, `@flip1995` correctly suggested using a script for this in `rust-clippy#7813`... And I decided to write a script using nushell because why not? This was a mistake... I spend way more time on this than I would like to admit. It has definitely been more than 4 hours. It shouldn't take that long, but me being new to scripting and nushell just wasn't a good mixture... Anyway, here is the script that creates another script which adds the versions. Fun... Just execute this on the `gh-pages` branch and the resulting `replacer.sh` in `clippy_lints` and it should all work. ```nu mv v0.0.212 rust-1.00.0; mv beta rust-1.57.0; mv master rust-1.58.0; let paths = (open ./rust-1.58.0/lints.json | select id id_span | flatten | select id path); let versions = ( ls | where name =~ "rust-" | select name | format {name}/lints.json | each { open $it | select id | insert version $it | str substring "5,11" version} | group-by id | rotate counter-clockwise id version | update version {get version | first 1} | flatten | select id version); $paths | each { |row| let version = ($versions | where id == ($row.id) | format {version}) let idu = ($row.id | str upcase) $"sed -i '0,/($idu),/{s/pub ($idu),/#[clippy::version = "($version)"]\n pub ($idu),/}' ($row.path)" } | str collect ";" | str find-replace --all '1.00.0' 'pre 1.29.0' | save "replacer.sh"; ``` And this still has some problems, but at this point I just want to be done -.-
2021-07-29Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyupflip1995-5/+5
2021-07-28Update lint documentation to use markdown headlinesxFrednet-5/+5
2021-06-03Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyupflip1995-1/+1
2021-05-25Add semicolons up to `needless_for_each.rs`mbartlett21-1/+1
2021-03-25Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyupflip1995-1/+2
2021-03-17Don't re-export clippy_utils::*Cameron Steffen-1/+1
2021-03-15Don't re-export clippy_utils::diagnostics::*Cameron Steffen-1/+2
2021-03-12Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyupflip1995-5/+1
2021-03-01Add version = "Two" to rustfmt.tomlCameron Steffen-5/+1
Ignore UI tests since this change makes rustfmt less friendly with UI test comments.
2021-01-07Reintroduce hir::ExprKind::IfCaio-0/+4
2020-10-23Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyupEduardo Broto-55/+11
2020-10-17Assert macro args extractor as a common function in higherThibsG-55/+11
2020-09-04`ty.kind` -> `ty.kind()` in rustdoc and clippyLeSeulArtichaut-1/+1
2020-07-17Rename TypeckTables to TypeckResults.Valentin Lazureanu-1/+1
2020-07-03Use 'tcx for references to AccessLevels wherever possible.Eduard-Mihai Burtescu-5/+5
2020-06-26rustc_lint: only query `typeck_tables_of` when a lint needs it.Eduard-Mihai Burtescu-1/+1
2020-04-08Move cognitive_complexity to nurseryDavid Tolnay-1/+0
2020-03-30rustup https://github.com/rust-lang/rust/pull/70536Matthias Krüger-2/+2
2020-03-25Remove dependency on `matches` cratePhilipp Hansch-1/+0
The std equivalent works exactly the same.
2020-03-16rustup https://github.com/rust-lang/rust/pull/68944Matthias Krüger-2/+2
2020-01-31Move debug_assertions_with_mut_call to nurseryflip1995-1/+1
2020-01-31Don't trigger `debug_assert_with_mut_call` on `.await`flip1995-1/+3
2020-01-31Small refactor of mutable_debug_assertionsflip1995-24/+24
2020-01-13Rustup to rust-lang/rust#68045Yuki Okushi-1/+1
2020-01-11Rustup to rust-lang/rust#67806Yuki Okushi-3/+3
2020-01-09Rustup to rust-lang/rust#67979Yuki Okushi-2/+5