mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Parse and infer tuple indices
This commit is contained in:
parent
0372eca5b2
commit
ca40ca93a5
13 changed files with 210 additions and 14 deletions
|
@ -671,7 +671,10 @@ impl ExprCollector {
|
|||
}
|
||||
ast::ExprKind::FieldExpr(e) => {
|
||||
let expr = self.collect_expr_opt(e.expr());
|
||||
let name = e.name_ref().map(|nr| nr.as_name()).unwrap_or_else(Name::missing);
|
||||
let name = match e.field_access() {
|
||||
Some(kind) => kind.as_name(),
|
||||
_ => Name::missing(),
|
||||
};
|
||||
self.alloc_expr(Expr::Field { expr, name }, syntax_ptr)
|
||||
}
|
||||
ast::ExprKind::TryExpr(e) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue