rust-analyzer guided tuple field to named field
This commit is contained in:
parent
b08a557f80
commit
e3828777a6
16 changed files with 33 additions and 24 deletions
|
@ -688,8 +688,8 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> {
|
|||
}
|
||||
|
||||
// These items live in the value namespace.
|
||||
ItemKind::Static(ast::Static(_, mt, _)) => {
|
||||
let res = Res::Def(DefKind::Static(mt), def_id);
|
||||
ItemKind::Static(ast::Static { mutability, .. }) => {
|
||||
let res = Res::Def(DefKind::Static(mutability), def_id);
|
||||
self.r.define(parent, ident, ValueNS, (res, vis, sp, expansion));
|
||||
}
|
||||
ItemKind::Const(..) => {
|
||||
|
|
|
@ -2346,7 +2346,8 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
|
|||
});
|
||||
}
|
||||
|
||||
ItemKind::Static(ast::Static(ref ty, _, ref expr)) | ItemKind::Const(_, ref ty, ref expr) => {
|
||||
ItemKind::Static(ast::Static { ref ty, ref expr, .. })
|
||||
| ItemKind::Const(_, ref ty, ref expr) => {
|
||||
self.with_static_rib(|this| {
|
||||
this.with_lifetime_rib(LifetimeRibKind::Elided(LifetimeRes::Static), |this| {
|
||||
this.visit_ty(ty);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue