Various keyword completion fixes

This commit is contained in:
Lukas Wirth 2021-06-21 15:14:28 +02:00
parent b9d85f55b7
commit 0729913525
4 changed files with 40 additions and 34 deletions

View file

@ -286,8 +286,11 @@ impl<'a> CompletionContext<'a> {
)
}
pub(crate) fn expect_record_field(&self) -> bool {
matches!(self.completion_location, Some(ImmediateLocation::RecordField))
pub(crate) fn expect_field(&self) -> bool {
matches!(
self.completion_location,
Some(ImmediateLocation::RecordField | ImmediateLocation::TupleField)
)
}
pub(crate) fn in_use_tree(&self) -> bool {