aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/render/macro_.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/render/macro_.rs')
-rw-r--r--crates/ide_completion/src/render/macro_.rs8
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)]
135mod tests { 135mod 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/// ```
181macro_rules! vec { () => {} } 181macro_rules! vec { () => {} }
182 182
183fn fn main() { v$0 } 183fn 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/// ```
194macro_rules! vec { () => {} } 194macro_rules! vec { () => {} }
195 195
196fn fn main() { vec![$0] } 196fn main() { vec![$0] }
197"#, 197"#,
198 ); 198 );
199 199