1
Fork 0

Remove HirId from QPath::LangItem

This commit is contained in:
Michael Goulet 2023-11-23 06:01:35 +00:00
parent fe3038f263
commit fa7633dda1
12 changed files with 41 additions and 71 deletions

View file

@ -2058,8 +2058,8 @@ pub enum QPath<'hir> {
/// the `X` and `Y` nodes each being a `TyKind::Path(QPath::TypeRelative(..))`.
TypeRelative(&'hir Ty<'hir>, &'hir PathSegment<'hir>),
/// Reference to a `#[lang = "foo"]` item. `HirId` of the inner expr.
LangItem(LangItem, Span, Option<HirId>),
/// Reference to a `#[lang = "foo"]` item.
LangItem(LangItem, Span),
}
impl<'hir> QPath<'hir> {
@ -2068,7 +2068,7 @@ impl<'hir> QPath<'hir> {
match *self {
QPath::Resolved(_, path) => path.span,
QPath::TypeRelative(qself, ps) => qself.span.to(ps.ident.span),
QPath::LangItem(_, span, _) => span,
QPath::LangItem(_, span) => span,
}
}
@ -2078,7 +2078,7 @@ impl<'hir> QPath<'hir> {
match *self {
QPath::Resolved(_, path) => path.span,
QPath::TypeRelative(qself, _) => qself.span,
QPath::LangItem(_, span, _) => span,
QPath::LangItem(_, span) => span,
}
}
}