not-elm
5a63cd82cb
FIX(12243): redundant_guard
...
A warning is now suppressed when "<str_va> if <str_var>.is_empty" is used in a constant function.
FIX: instead of clippy_util::in_const
FIX: Merged `redundant_guards_const_fn.rs` into `redundant_guards.rs`.
2024-02-25 15:38:18 +09:00
Alex Macleod
1d107ab2be
Remove $DIR replacement in test output
2024-02-17 12:34:54 +00:00
Alex Macleod
b32d7c0631
Allow negative literals in redundant_guards
2024-02-14 13:31:02 +00:00
y21
1b4e2ef3d7
fix empty needle corner case and add tests
2023-11-15 21:10:03 +01:00
y21
558ae4c6a8
[redundant_guards
]: lint if the pattern is on the LHS
2023-09-17 15:34:32 +02:00
bors
ef736489e7
Auto merge of #11468 - mojave2:issue-11465, r=blyxyas
...
add extra `byref` checking for the guard's local
changelog: [`redundant_guards`]: Now checks if the variable is bound using `ref` before linting.
The lint should not be emitted, when the local variable is bind by-ref in the pattern.
fixes #11465
2023-09-16 22:02:10 +00:00
mojave2
8d3bbb0964
handle the byref binding in the struct pattern
2023-09-14 14:57:05 +08:00
mojave2
7f870201d3
add byref
checking for the guard's local
2023-09-13 11:13:51 +08:00
Urgau
a86e758228
Adjust clippy tests with new rustc help suggestion for lints
2023-09-04 14:22:02 +02:00
Philipp Krones
cc61aeea54
Merge commit '080b587854a73f2a8cbaecff1884860a78e2ff37' into clippyup
2023-08-24 21:32:12 +02:00
Oli Scherer
3d88fae050
Update ui test crate
2023-08-11 14:02:28 +00:00
Philipp Krones
f730a2655a
Merge commit '1e8fdf492808a25d78a97e1242b835ace9924e4d' into clippyup
2023-08-11 14:05:13 +02:00
y21
b6156502af
document the new behavior and add test for float in struct
2023-08-08 18:04:57 +02:00
y21
f959ccc09b
[redundant_guards
]: don't lint on floats
2023-08-08 17:19:53 +02:00
Philipp Krones
b0e64a9c09
Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyup
2023-07-31 23:53:53 +02:00
Centri3
51b57723d1
new lint redundant_guards
2023-07-22 06:28:05 -05:00