mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Fix panic in no_such_field when using tuple fields on record structs
This commit is contained in:
parent
e1e93c4438
commit
1bb58205f0
2 changed files with 17 additions and 2 deletions
|
@ -368,6 +368,7 @@ impl SourceAnalyzer {
|
|||
let local = if field.name_ref().is_some() {
|
||||
None
|
||||
} else {
|
||||
// Shorthand syntax, resolve to the local
|
||||
let path = ModPath::from_segments(PathKind::Plain, once(local_name.clone()));
|
||||
match self.resolver.resolve_path_in_value_ns_fully(db.upcast(), &path) {
|
||||
Some(ValueNs::LocalBinding(pat_id)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue