mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
rename struct -> record, pos -> tuple
This commit is contained in:
parent
c12dce0073
commit
5b18a4eef9
78 changed files with 640 additions and 634 deletions
|
@ -278,13 +278,13 @@ impl SourceAnalyzer {
|
|||
self.infer.as_ref()?.field_resolution(expr_id)
|
||||
}
|
||||
|
||||
pub fn resolve_struct_literal(&self, struct_lit: &ast::StructLit) -> Option<crate::VariantDef> {
|
||||
let expr_id = self.body_source_map.as_ref()?.node_expr(&struct_lit.clone().into())?;
|
||||
pub fn resolve_record_literal(&self, record_lit: &ast::RecordLit) -> Option<crate::VariantDef> {
|
||||
let expr_id = self.body_source_map.as_ref()?.node_expr(&record_lit.clone().into())?;
|
||||
self.infer.as_ref()?.variant_resolution_for_expr(expr_id)
|
||||
}
|
||||
|
||||
pub fn resolve_struct_pattern(&self, struct_pat: &ast::StructPat) -> Option<crate::VariantDef> {
|
||||
let pat_id = self.body_source_map.as_ref()?.node_pat(&struct_pat.clone().into())?;
|
||||
pub fn resolve_record_pattern(&self, record_pat: &ast::RecordPat) -> Option<crate::VariantDef> {
|
||||
let pat_id = self.body_source_map.as_ref()?.node_pat(&record_pat.clone().into())?;
|
||||
self.infer.as_ref()?.variant_resolution_for_pat(pat_id)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue