about summary refs log tree commit diff
path: root/clippy_lints/src/loops
AgeCommit message (Collapse)AuthorLines
2024-01-15Ensure `callee_id`s are body ownersSamuel Moelius-1/+1
2023-12-28Merge commit 'ac4c2094a6030530661bee3876e0228ddfeb6b8b' into clippy-subtree-syncPhilipp Krones-3/+3
2023-12-16Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyupPhilipp Krones-3/+172
2023-12-12Move some methods from `tcx.hir()` to `tcx`zetanumbers-3/+3
Renamings: - find -> opt_hir_node - get -> hir_node - find_by_def_id -> opt_hir_node_by_def_id - get_by_def_id -> hir_node_by_def_id Fix rebase changes using removed methods Use `tcx.hir_node_by_def_id()` whenever possible in compiler Fix clippy errors Fix compiler Apply suggestions from code review Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> Add FIXME for `tcx.hir()` returned type about its removal Simplify with with `tcx.hir_node_by_def_id`
2023-12-11Auto merge of #118661 - fee1-dead-contrib:restore-const-partialEq, ↵bors-1/+1
r=compiler-errors Restore `const PartialEq` And thus fixes a number of tests. There is a bug that still needs to be fixed, so WIP for now. r? `@compiler-errors`
2023-12-10fix clippyDeadbeef-1/+1
2023-12-10remove redundant importssurechen-5/+2
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-12-01Merge commit 'f0cdee4a3f094416189261481eae374b76792af1' into clippy-subtree-syncPhilipp Krones-11/+26
2023-11-16Merge commit 'edb720b199083f4107b858a8761648065bf38d86' into clippyupPhilipp Krones-540/+522
2023-11-03Auto merge of #117507 - nnethercote:rustc_span, r=Nilstriebbors-4/+4
`rustc_span` cleanups Just some things I found while looking over this crate. r? `@oli-obk`
2023-11-02Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyupPhilipp Krones-56/+147
2023-11-02Minimize `pub` usage in `source_map.rs`.Nicholas Nethercote-4/+4
Most notably, this commit changes the `pub use crate::*;` in that file to `use crate::*;`. This requires a lot of `use` items in other crates to be adjusted, because everything defined within `rustc_span::*` was also available via `rustc_span::source_map::*`, which is bizarre. The commit also removes `SourceMap::span_to_relative_line_string`, which is unused.
2023-10-21Merge commit '2b030eb03d9e5837440b1ee0b98c50b97c0c5889' into clippyupPhilipp Krones-1/+1
2023-09-25Merge commit '7671c283a50b5d1168841f3014b14000f01dd204' into clippyupPhilipp Krones-2/+1
2023-09-12Merge commit '98363cbf6a7c3f8b571a7d92a3c645bb4376e4a6' into clippyupPhilipp Krones-135/+160
2023-08-11Merge commit '1e8fdf492808a25d78a97e1242b835ace9924e4d' into clippyupPhilipp Krones-1/+3
2023-08-04Improve spans for indexing expressionsNilstrieb-5/+5
Indexing is similar to method calls in having an arbitrary left-hand-side and then something on the right, which is the main part of the expression. Method calls already have a span for that right part, but indexing does not. This means that long method chains that use indexing have really bad spans, especially when the indexing panics and that span in coverted into a panic location. This does the same thing as method calls for the AST and HIR, storing an extra span which is then put into the `fn_span` field in THIR.
2023-07-31Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyupPhilipp Krones-4/+5
2023-07-17Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyupPhilipp Krones-29/+25
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-3/+3
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-2/+2
2023-07-02Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyupPhilipp Krones-134/+384
2023-06-26Support `hir::ExprKind::Become` in clippyMaybe Waffle-0/+6
2023-05-05Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyupPhilipp Krones-3/+146
2023-04-21offset_ofDrMeepster-1/+2
2023-03-24Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyupPhilipp Krones-13/+19
2023-03-14Remove box expressions from HIRclubby789-2/+1
2023-03-02rustc_middle: Remove trait `DefIdTree`Vadim Petrochenkov-1/+1
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-02-26Auto merge of #108474 - Jarcho:clippyup, r=Manishearthbors-25/+34
Update Clippy Seems like `@flip1995` so this is a couple days late. r? `@Manishearth`
2023-02-25Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyupJason Newcomb-25/+34
2023-02-25Make clippy happyMichael Goulet-1/+1
2023-02-14s/eval_usize/eval_target_usize/ for clarityOli Scherer-2/+2
2023-02-10Merge commit '0f7558148c22e53cd4608773b56cdfa50dcdeac3' into clippyupPhilipp Krones-2/+3
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-1/+1
EarlyBinder to fn_sig in metadata
2023-01-26replace usages of fn_sig query with bound_fn_sigKyle Matsuda-1/+1
2023-01-19Use UnordMap instead of FxHashMap in define_id_collections!().Michael Woerister-1/+1
2023-01-12Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyupPhilipp Krones-2/+4
2023-01-04rename get_parent_node to parent_idMichael Goulet-1/+1
2022-12-29Merge commit '4f3ab69ea0a0908260944443c739426cc384ae1a' into clippyupPhilipp Krones-1/+1
2022-12-17Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyupPhilipp Krones-7/+3
2022-11-21Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyupPhilipp Krones-479/+74
2022-10-23Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyupflip1995-15/+25
2022-10-20rustc_hir_typeck: fix clippylcnr-2/+2
2022-10-09deprecate `clippy::for_loops_over_fallibles`Maybe Waffle-124/+3
2022-10-07Change InferCtxtBuilder from enter to buildCameron Steffen-10/+9
2022-10-06Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyupPhilipp Krones-74/+69
2022-09-27rustc_typeck to rustc_hir_analysislcnr-3/+3
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-1/+1
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-09Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyupPhilipp Krones-2/+2
2022-09-06Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillotbors-4/+4
`BindingAnnotation` refactor * `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`) * `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)` * Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}` One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`. I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.