syntax_pos: Introduce a helper for checking whether a span comes from expansion

This commit is contained in:
Vadim Petrochenkov 2019-08-11 01:08:30 +03:00
parent f7af19c279
commit dfcbe75900
12 changed files with 25 additions and 20 deletions

View file

@ -108,7 +108,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TyTyKind {
.help("try using `Ty` instead")
.emit();
} else {
if ty.span.ctxt().outer_expn_info().is_some() {
if ty.span.from_expansion() {
return;
}
if let Some(t) = is_ty_or_ty_ctxt(cx, ty) {