Auto merge of #124401 - oli-obk:some_hir_cleanups, r=cjgillot
Some hir cleanups It seemed odd to not put `AnonConst` in the arena, compared with the other types that we did put into an arena. This way we can also give it a `Span` without growing a lot of other HIR data structures because of the extra field. r? compiler
This commit is contained in:
commit
09cd00fea4
16 changed files with 89 additions and 87 deletions
|
@ -885,7 +885,7 @@ impl<'hir> Map<'hir> {
|
|||
Node::ImplItem(impl_item) => impl_item.span,
|
||||
Node::Variant(variant) => variant.span,
|
||||
Node::Field(field) => field.span,
|
||||
Node::AnonConst(constant) => self.body(constant.body).value.span,
|
||||
Node::AnonConst(constant) => constant.span,
|
||||
Node::ConstBlock(constant) => self.body(constant.body).value.span,
|
||||
Node::Expr(expr) => expr.span,
|
||||
Node::ExprField(field) => field.span,
|
||||
|
@ -912,7 +912,7 @@ impl<'hir> Map<'hir> {
|
|||
Node::ArrayLenInfer(inf) => inf.span,
|
||||
Node::PreciseCapturingNonLifetimeArg(param) => param.ident.span,
|
||||
Node::Synthetic => unreachable!(),
|
||||
Node::Err(span) => *span,
|
||||
Node::Err(span) => span,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue