Complete local fn and closure params from surrounding locals scope

This commit is contained in:
Lukas Wirth 2022-01-31 11:56:42 +01:00
parent ddf7b70a0f
commit 6194092086
5 changed files with 203 additions and 92 deletions

View file

@ -389,8 +389,8 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
self.imp.scope(node)
}
pub fn scope_at_offset(&self, token: &SyntaxToken, offset: TextSize) -> SemanticsScope<'db> {
self.imp.scope_at_offset(&token.parent().unwrap(), offset)
pub fn scope_at_offset(&self, node: &SyntaxNode, offset: TextSize) -> SemanticsScope<'db> {
self.imp.scope_at_offset(&node, offset)
}
pub fn scope_for_def(&self, def: Trait) -> SemanticsScope<'db> {