mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Refine self
, super
and crate
completion in use paths
This commit is contained in:
parent
e14f5cfff0
commit
2225db2eb4
9 changed files with 47 additions and 54 deletions
|
@ -28,7 +28,7 @@ impl Builder {
|
|||
if !ctx.config.add_call_parenthesis {
|
||||
return false;
|
||||
}
|
||||
if ctx.use_item_syntax.is_some() {
|
||||
if ctx.in_use_tree() {
|
||||
cov_mark::hit!(no_parens_in_use_item);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ impl<'a> MacroRender<'a> {
|
|||
}
|
||||
|
||||
fn needs_bang(&self) -> bool {
|
||||
self.ctx.completion.use_item_syntax.is_none()
|
||||
!self.ctx.completion.in_use_tree()
|
||||
&& !matches!(self.ctx.completion.path_call_kind(), Some(CallKind::Mac))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue