mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Complete local fn and closure params from surrounding locals scope
This commit is contained in:
parent
ddf7b70a0f
commit
6194092086
5 changed files with 203 additions and 92 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue