Guillaume Gomez
3e6db95e30
Add regression test for #11561
2023-10-18 21:17:32 +02:00
Guillaume Gomez
3b4b07c5f8
Add test for closure in non-async function for needless_pass_by_ref_mut
lint
2023-10-18 21:17:31 +02:00
Guillaume Gomez
80a092c6df
Add test for needless_pass_by_ref_mut
to ensure that the lint is not emitted if variable is used in an unsafe block or function
2023-10-17 15:36:38 +02:00
Guillaume Gomez
ddd1564e5d
Add regression test for #11610 about mutable usage of argument in async function for the needless_pass_by_ref_mut
lint
2023-10-06 11:18:34 +02:00
blyxyas
07e63291ec
Modify tests to account for the new allow-by-default needless_pass_by_ref_mut
2023-10-02 20:14:43 +02:00
pc-linux
ab51f66ec0
added tests
2023-09-22 18:04:57 +02:00
Guillaume Gomez
e3267b1fe7
Fix mutaby used async function argument in closure for needless_pass_by_ref_mut
2023-09-13 15:14:27 +02:00
bors
d5298bea7f
Auto merge of #11314 - GuillaumeGomez:needless_ref_mut_async_block, r=Centri3
...
Correctly handle async blocks for NEEDLESS_PASS_BY_REF_MUT
Fixes https://github.com/rust-lang/rust-clippy/issues/11299 .
The problem was that the `async block`s are popping a closure which we didn't go into, making it miss the mutable access to the variables.
cc `@Centri3`
changelog: none
2023-08-17 15:55:23 +00:00
Guillaume Gomez
7e46217362
Add new regression test for needless_pass_by_ref_mut
2023-08-17 14:24:04 +02:00
Oli Scherer
3d88fae050
Update ui test crate
2023-08-11 14:02:28 +00:00
Guillaume Gomez
1d01f1bac1
Update UI test for async blocks for NEEDLESS_PASS_BY_REF_MUT
2023-08-10 16:23:27 +02:00
Guillaume Gomez
04b710b569
Use libtest errors check to better enforce UI testing
2023-07-25 18:43:58 +02:00
Guillaume Gomez
15de3dd2af
Add a note if the function is behind a cfg
2023-07-25 18:08:16 +02:00
Catherine Flores
ef482d17f2
Do not lint if used as a fn
-like argument
2023-07-24 19:29:23 -05:00
Guillaume Gomez
5e9e46278e
Update needless_pass_by_ref_mut
ui test
2023-07-18 22:21:02 +02:00
Guillaume Gomez
a43bea1016
Add UI test for needless_pass_by_ref_mut
2023-07-03 22:25:36 +02:00