Skip to content

Commit f8c4b6c

Browse files
committed
Auto merge of #108640 - matthiaskrgr:rollup-rii4t5t, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #108516 (Restrict `#[rustc_box]` to `Box::new` calls) - #108575 (Erase **all** regions when probing for associated types on ambiguity in astconv) - #108585 (Run compiler test suite in parallel on Fuchsia) - #108606 (Add test case for mismatched open/close delims) - #108609 (Highlight whole expression for E0599) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 643fedb + 6ff9898 commit f8c4b6c

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

clippy_utils/src/higher.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,12 @@ impl<'a> VecArgs<'a> {
287287
Some(VecArgs::Repeat(&args[0], &args[1]))
288288
} else if match_def_path(cx, fun_def_id, &paths::SLICE_INTO_VEC) && args.len() == 1 {
289289
// `vec![a, b, c]` case
290-
if_chain! {
291-
if let hir::ExprKind::Box(boxed) = args[0].kind;
292-
if let hir::ExprKind::Array(args) = boxed.kind;
293-
then {
294-
return Some(VecArgs::Vec(args));
295-
}
290+
if let hir::ExprKind::Call(_, [arg]) = &args[0].kind
291+
&& let hir::ExprKind::Array(args) = arg.kind {
292+
Some(VecArgs::Vec(args))
293+
} else {
294+
None
296295
}
297-
298-
None
299296
} else if match_def_path(cx, fun_def_id, &paths::VEC_NEW) && args.is_empty() {
300297
Some(VecArgs::Vec(&[]))
301298
} else {

0 commit comments

Comments
 (0)