More precise spans for HIR paths
This commit is contained in:
parent
2ccf06302c
commit
7e66e9d6b0
22 changed files with 60 additions and 30 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue