1
Fork 0

Avoid some def_span query calls

This commit is contained in:
Oli Scherer 2024-04-29 09:48:19 +00:00
parent 90704199fa
commit fea1fe7f01
3 changed files with 12 additions and 15 deletions

View file

@ -566,7 +566,8 @@ fn construct_const<'a, 'tcx>(
span,
..
}) => (*span, ty.span),
Node::AnonConst(_) | Node::ConstBlock(_) => {
Node::AnonConst(ct) => (ct.span, ct.span),
Node::ConstBlock(_) => {
let span = tcx.def_span(def);
(span, span)
}