Commit Graph

17 Commits

Author SHA1 Message Date
Yuxiang Qiu
88541d6637
fix some typos 2024-01-02 19:21:51 -05:00
y21
18f36897ef use the correct node args for substitution 2023-09-05 19:08:34 +02:00
y21
cf10690ad4 check that the receiver type satisfies bounds 2023-09-04 16:34:57 +02:00
y21
e34e49f7ff useless_conversion: don't lint if ty param has multiple bounds 2023-09-04 16:20:38 +02:00
y21
f47165c703 find expansions more efficiently 2023-08-14 16:50:31 +02:00
Oli Scherer
3d88fae050 Update ui test crate 2023-08-11 14:02:28 +00:00
Centri3
26f50395ba Add needless_if lint 2023-06-10 06:51:03 -05:00
y21
de1f410018 merge explicit_into_iter_fn_arg into useless_conversion 2023-05-30 22:32:26 +02:00
Centri3
1190c02bb8 fix #10773 2023-05-14 12:21:23 -05:00
Oli Scherer
def1705a27 Update to a compiletest-rs version that requires //@ for commands 2023-04-20 14:44:03 +00:00
Samuel Tardieu
af39a8a4a8 Identify more cases of useless into_iter() calls
If the type of the result of a call to `IntoIterator::into_iter()`
and the type of the receiver are the same, then the receiver
implements `Iterator` and `into_iter()` is the identity function.

The call to `into_iter()` may be removed in all but two cases:

- If the receiver implements `Copy`, `into_iter()` will produce
  a copy of the receiver and cannot be removed. For example,
  `x.into_iter().next()` will not advance `x` while `x.next()` will.
- If the receiver is an immutable local variable and the call to
  `into_iter()` appears in a larger expression, removing the call to
  `into_iter()` might cause mutability issues. For example, if `x`
  is an immutable local variable, `x.into_iter().next()` will
  compile while `x.next()` will not as `next()` receives
  `&mut self`.
2022-12-17 16:20:43 +01:00
r00ster91
599d9126a2 Some "parenthesis" and "parentheses" fixes 2021-10-17 12:04:01 +02:00
flip1995
97705b7ea6 Merge commit '9e3cd88718cd1912a515d26dbd9c4019fd5a9577' into clippyup 2021-05-20 13:07:57 +02:00
flip1995
d3d2018ead Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup 2020-11-23 13:51:04 +01:00
flip1995
282c59820b Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
flip1995
d164ab65f7 Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' into clippyup 2020-07-26 21:07:07 +02:00
flip1995
f1d3086492 Merge commit 'e214ea82ad0a751563acf67e1cd9279cf302db3a' into clippyup 2020-05-17 17:36:26 +02:00