1
Fork 0

Make use of new outer_expn_info() function

This commit is contained in:
Lzu Tao 2019-06-01 16:25:51 +07:00
parent f3087c37bf
commit f67c3e4b2a
7 changed files with 12 additions and 25 deletions

View file

@ -49,13 +49,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UselessVec {
// report the error around the `vec!` not inside `<std macros>:`
let span = arg.span
.ctxt()
.outer()
.expn_info()
.outer_expn_info()
.map(|info| info.call_site)
.expect("unable to get call_site")
.ctxt()
.outer()
.expn_info()
.outer_expn_info()
.map(|info| info.call_site)
.expect("unable to get call_site");
check_vec_macro(cx, &vec_args, span);