Fix clippy with for loop span change
This commit is contained in:
parent
a697aa63d6
commit
ffdd5a04a4
1 changed files with 1 additions and 7 deletions
|
@ -63,13 +63,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessVec {
|
||||||
if is_copy(cx, vec_type(cx.typeck_results().expr_ty_adjusted(arg)));
|
if is_copy(cx, vec_type(cx.typeck_results().expr_ty_adjusted(arg)));
|
||||||
then {
|
then {
|
||||||
// report the error around the `vec!` not inside `<std macros>:`
|
// report the error around the `vec!` not inside `<std macros>:`
|
||||||
let span = arg.span
|
let span = arg.span.ctxt().outer_expn_data().call_site;
|
||||||
.ctxt()
|
|
||||||
.outer_expn_data()
|
|
||||||
.call_site
|
|
||||||
.ctxt()
|
|
||||||
.outer_expn_data()
|
|
||||||
.call_site;
|
|
||||||
self.check_vec_macro(cx, &vec_args, Mutability::Not, span);
|
self.check_vec_macro(cx, &vec_args, Mutability::Not, span);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue