Skip to content

Commit 449d68d

Browse files
committed
Fix clippy with for loop span change
1 parent 049ab82 commit 449d68d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

clippy_lints/src/vec.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessVec {
6363
if is_copy(cx, vec_type(cx.typeck_results().expr_ty_adjusted(arg)));
6464
then {
6565
// report the error around the `vec!` not inside `<std macros>:`
66-
let span = arg.span
67-
.ctxt()
68-
.outer_expn_data()
69-
.call_site
70-
.ctxt()
71-
.outer_expn_data()
72-
.call_site;
66+
let span = arg.span.ctxt().outer_expn_data().call_site;
7367
self.check_vec_macro(cx, &vec_args, Mutability::Not, span);
7468
}
7569
}

0 commit comments

Comments
 (0)