1
Fork 0

More precise spans for HIR paths

This commit is contained in:
Vadim Petrochenkov 2021-03-13 19:14:18 +03:00
parent 2ccf06302c
commit 7e66e9d6b0
22 changed files with 60 additions and 30 deletions

View file

@ -1809,7 +1809,7 @@ impl<'hir> QPath<'hir> {
pub fn span(&self) -> Span {
match *self {
QPath::Resolved(_, path) => path.span,
QPath::TypeRelative(_, ps) => ps.ident.span,
QPath::TypeRelative(qself, ps) => qself.span.to(ps.ident.span),
QPath::LangItem(_, span) => span,
}
}