Skip to content

Commit

Permalink
Fix clippy with for loop span change
Browse files Browse the repository at this point in the history
  • Loading branch information
camsteffen committed Oct 15, 2021
1 parent 049ab82 commit 449d68d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions clippy_lints/src/vec.rs
Expand Up @@ -63,13 +63,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessVec {
if is_copy(cx, vec_type(cx.typeck_results().expr_ty_adjusted(arg)));
then {
// report the error around the `vec!` not inside `<std macros>:`
let span = arg.span
.ctxt()
.outer_expn_data()
.call_site
.ctxt()
.outer_expn_data()
.call_site;
let span = arg.span.ctxt().outer_expn_data().call_site;
self.check_vec_macro(cx, &vec_args, Mutability::Not, span);
}
}
Expand Down

0 comments on commit 449d68d

Please sign in to comment.