about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-12 16:25:59 +0000
committerbors <bors@rust-lang.org>2023-06-12 16:25:59 +0000
commitda56c3502ace00cfdef77af38cead0b9802e97fb (patch)
treee44a890859ffa11803edf74a2739d4c995c1d49c /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentb095247ab637194fbf6d271fc6a55552572dea2d (diff)
parent50ba459987a9b73a2db99e19b774531070a9f5fa (diff)
downloadrust-da56c3502ace00cfdef77af38cead0b9802e97fb.tar.gz
rust-da56c3502ace00cfdef77af38cead0b9802e97fb.zip
Auto merge of #10933 - y21:issue2262-followup, r=Centri3
[`useless_vec`]: lint on `vec![_]` invocations that adjust to a slice

Fixes #2262 (well, actually my PR over at #10901 did do most of the stuff, but this PR implements the one last other case mentioned in the comments that my PR didn't fix)

Before this change, it would lint `(&vec![1]).iter().sum::<i32>()`, but not `vec![1].iter().sum::<i32>()`. This PR handles this case.
This also refactors a few things that I wanted to do in my other PR but forgot about.

changelog: [`useless_vec`]: lint on `vec![_]` invocations that adjust to a slice
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions