about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorMateusz Gacek <96mateusz.gacek@gmail.com>2021-02-24 21:06:26 +0100
committerMateusz Gacek <96mateusz.gacek@gmail.com>2021-02-25 14:23:38 +0100
commit2f0e9f7d3afb3cb169e58d65261f04215b017561 (patch)
tree62ab59f472627a26721070898d93881ede53bd28 /src/test/ui/thinlto
parent877be189ad6fa6a50f9fd295296c446892b4009d (diff)
downloadrust-2f0e9f7d3afb3cb169e58d65261f04215b017561.tar.gz
rust-2f0e9f7d3afb3cb169e58d65261f04215b017561.zip
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)`
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions