mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
hide keyword suggestions in non trivial paths
This commit is contained in:
parent
478d435640
commit
7b20904e8b
3 changed files with 10 additions and 16 deletions
|
@ -353,6 +353,10 @@ impl<'a> CompletionContext<'a> {
|
|||
matches!(self.path_context, Some(PathCompletionContext { is_trivial_path: true, .. }))
|
||||
}
|
||||
|
||||
pub(crate) fn is_non_trivial_path(&self) -> bool {
|
||||
matches!(self.path_context, Some(PathCompletionContext { is_trivial_path: false, .. }))
|
||||
}
|
||||
|
||||
pub(crate) fn path_qual(&self) -> Option<&ast::Path> {
|
||||
self.path_context.as_ref().and_then(|it| it.qualifier.as_ref())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue