Commit graph

14 commits

Author SHA1 Message Date
Mateusz Gacek
2f0e9f7d3a or_fun_call: fix suggestion for or_insert(vec![])
Applies for `std::collections::hash_map::Entry` and `std::collections::btree_map::Entry`

Example:
Previously, for the following code:
`let _ = hash_map.entry("test".to_owned()).or_insert(vec![]);`
clippy would suggest to use:
`or_insert_with(vec![])`, which causes a compiler error (E0277).

Now clippy suggests:
`or_insert_with(Vec::new)`
2021-02-25 14:23:38 +01:00
Hirochika Matsumoto
4c8d248190 Update stderr files 2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
86331a46e4 Update stderr files 2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
30632fb8e6 Allow this lint on lint tests 2020-11-18 01:28:37 +09:00
Cameron Steffen
9cab08465b Fix or_fun_call for index operator 2020-11-08 14:49:42 -06:00
Eduardo Broto
3e294b22a4 Revert "or_fn_call: ignore nullary associated const fns"
This reverts commit 7a66e6502d.
2020-09-23 00:34:56 +02:00
Eduardo Broto
7a66e6502d or_fn_call: ignore nullary associated const fns 2020-08-29 01:20:49 +02:00
flip1995
5bdbc45ae5
Rustup to rust-lang/rust#71796 2020-06-07 03:07:48 +02:00
flip1995
7d58ba20b4
Rustup to rust-lang/rust#70632 2020-04-01 20:14:05 +02:00
flip1995
d2d62de841
Rustup to rust-lang/rust#64856 2019-11-25 13:56:24 +01:00
Philipp Hansch
18fb1d9d2f
Add run-rustfix for or_fun_call tests 2019-08-22 07:41:00 +02:00
Michael Wright
e6e3f24e0c Fix #4019 2019-05-12 10:18:38 +02:00
Philipp Hansch
de24a74b45
Add test for or_fun_call macro suggestion
Closes #1018
2019-04-24 08:11:20 +02:00
Philipp Hansch
fdc2255e81
UI test cleanup: Extract or_fun_call tests 2019-04-11 07:47:04 +02:00