Fixed diagnostic and added test for issue 81508
This commit is contained in:
@@ -1031,7 +1031,6 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||
}
|
||||
|
||||
ItemKind::Static(ref ty, _, ref expr) | ItemKind::Const(_, ref ty, ref expr) => {
|
||||
debug!("resolve_item ItemKind::Const");
|
||||
self.with_item_rib(HasGenericParams::No, |this| {
|
||||
this.visit_ty(ty);
|
||||
if let Some(expr) = expr {
|
||||
@@ -1597,6 +1596,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||
.try_resolve_as_non_binding(pat_src, pat, bmode, ident, has_sub)
|
||||
.unwrap_or_else(|| self.fresh_binding(ident, pat.id, pat_src, bindings));
|
||||
self.r.record_partial_res(pat.id, PartialRes::new(res));
|
||||
self.r.record_local_span(pat.id, pat.span);
|
||||
}
|
||||
PatKind::TupleStruct(ref path, ref sub_patterns) => {
|
||||
self.smart_resolve_path(
|
||||
|
||||
Reference in New Issue
Block a user