resolve: Centralize retrieval of items span and item name

This commit is contained in:
Vadim Petrochenkov
2023-02-22 11:14:20 +04:00
parent c7f424b80a
commit 2a716f3563
5 changed files with 37 additions and 69 deletions

View File

@@ -3376,7 +3376,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
participle: "defined",
article: res.article(),
shadowed_binding: res,
shadowed_binding_span: self.r.opt_span(def_id).expect("const parameter defined outside of local crate"),
shadowed_binding_span: self.r.def_span(def_id),
}
);
None