mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
fix: flyimport triggers on enum variant declarations
This commit is contained in:
parent
766b52b598
commit
5666046ec9
4 changed files with 38 additions and 0 deletions
|
@ -171,6 +171,10 @@ impl<'a> CompletionContext<'a> {
|
|||
matches!(self.completion_location, Some(ImmediateLocation::Trait | ImmediateLocation::Impl))
|
||||
}
|
||||
|
||||
pub(crate) fn expects_variant(&self) -> bool {
|
||||
matches!(self.completion_location, Some(ImmediateLocation::Variant))
|
||||
}
|
||||
|
||||
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