mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Only complete modules in empty use-statements
This commit is contained in:
parent
01bfc5f5c0
commit
9e71dd9799
3 changed files with 27 additions and 14 deletions
|
@ -276,6 +276,10 @@ impl<'a> CompletionContext<'a> {
|
|||
)
|
||||
}
|
||||
|
||||
pub(crate) fn expects_use_tree(&self) -> bool {
|
||||
matches!(self.completion_location, Some(ImmediateLocation::Use))
|
||||
}
|
||||
|
||||
pub(crate) fn expects_non_trait_assoc_item(&self) -> bool {
|
||||
matches!(self.completion_location, Some(ImmediateLocation::Impl))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue