mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Do not drop ..Default::default()
completion when typing ..
This commit is contained in:
parent
f2246fecef
commit
e729529410
3 changed files with 84 additions and 49 deletions
|
@ -191,6 +191,7 @@ pub(crate) fn determine_location(
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
let res = match_ast! {
|
||||
match parent {
|
||||
ast::IdentPat(_it) => ImmediateLocation::IdentPat,
|
||||
|
@ -206,6 +207,9 @@ pub(crate) fn determine_location(
|
|||
} else {
|
||||
ImmediateLocation::RecordField
|
||||
},
|
||||
ast::RecordExprFieldList(_it) => sema
|
||||
.find_node_at_offset_with_macros(original_file, offset)
|
||||
.map(ImmediateLocation::RecordExpr)?,
|
||||
ast::TupleField(_it) => ImmediateLocation::TupleField,
|
||||
ast::TupleFieldList(_it) => ImmediateLocation::TupleField,
|
||||
ast::TypeBound(_it) => ImmediateLocation::TypeBound,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue