aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/context.rs')
-rw-r--r--crates/ide_completion/src/context.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs
index fbef54408..923e35dbb 100644
--- a/crates/ide_completion/src/context.rs
+++ b/crates/ide_completion/src/context.rs
@@ -276,6 +276,10 @@ impl<'a> CompletionContext<'a> {
276 ) 276 )
277 } 277 }
278 278
279 pub(crate) fn expects_use_tree(&self) -> bool {
280 matches!(self.completion_location, Some(ImmediateLocation::Use))
281 }
282
279 pub(crate) fn expects_non_trait_assoc_item(&self) -> bool { 283 pub(crate) fn expects_non_trait_assoc_item(&self) -> bool {
280 matches!(self.completion_location, Some(ImmediateLocation::Impl)) 284 matches!(self.completion_location, Some(ImmediateLocation::Impl))
281 } 285 }