diff options
Diffstat (limited to 'crates/ide_completion/src/render/macro_.rs')
-rw-r--r-- | crates/ide_completion/src/render/macro_.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide_completion/src/render/macro_.rs b/crates/ide_completion/src/render/macro_.rs index 429d937c8..4d5179c4f 100644 --- a/crates/ide_completion/src/render/macro_.rs +++ b/crates/ide_completion/src/render/macro_.rs | |||
@@ -69,7 +69,7 @@ impl<'a> MacroRender<'a> { | |||
69 | } | 69 | } |
70 | 70 | ||
71 | fn needs_bang(&self) -> bool { | 71 | fn needs_bang(&self) -> bool { |
72 | self.ctx.completion.use_item_syntax.is_none() | 72 | !self.ctx.completion.in_use_tree() |
73 | && !matches!(self.ctx.completion.path_call_kind(), Some(CallKind::Mac)) | 73 | && !matches!(self.ctx.completion.path_call_kind(), Some(CallKind::Mac)) |
74 | } | 74 | } |
75 | 75 | ||
@@ -133,7 +133,7 @@ fn guess_macro_braces(macro_name: &str, docs: &str) -> (&'static str, &'static s | |||
133 | 133 | ||
134 | #[cfg(test)] | 134 | #[cfg(test)] |
135 | mod tests { | 135 | mod tests { |
136 | use crate::test_utils::check_edit; | 136 | use crate::tests::check_edit; |
137 | 137 | ||
138 | #[test] | 138 | #[test] |
139 | fn dont_insert_macro_call_parens_unncessary() { | 139 | fn dont_insert_macro_call_parens_unncessary() { |
@@ -180,7 +180,7 @@ fn main() { frobnicate!(); } | |||
180 | /// ``` | 180 | /// ``` |
181 | macro_rules! vec { () => {} } | 181 | macro_rules! vec { () => {} } |
182 | 182 | ||
183 | fn fn main() { v$0 } | 183 | fn main() { v$0 } |
184 | "#, | 184 | "#, |
185 | r#" | 185 | r#" |
186 | /// Creates a [`Vec`] containing the arguments. | 186 | /// Creates a [`Vec`] containing the arguments. |
@@ -193,7 +193,7 @@ fn fn main() { v$0 } | |||
193 | /// ``` | 193 | /// ``` |
194 | macro_rules! vec { () => {} } | 194 | macro_rules! vec { () => {} } |
195 | 195 | ||
196 | fn fn main() { vec![$0] } | 196 | fn main() { vec![$0] } |
197 | "#, | 197 | "#, |
198 | ); | 198 | ); |
199 | 199 | ||