about summary refs log tree commit diff
diff options
context:
space:
mode:
authorunvalley <kirohi.code@gmail.com>2022-11-27 18:24:43 +0900
committerLukas Wirth <lukastw97@gmail.com>2023-01-09 12:23:06 +0100
commita310fc0cd53ff8528ef31b5021c490fd944ab199 (patch)
tree699c14c6c9031c86d729784f037959071bfa8d2f
parent872df2f4131d1dc40a412d4b160cc031a2f30c03 (diff)
downloadrust-a310fc0cd53ff8528ef31b5021c490fd944ab199.tar.gz
rust-a310fc0cd53ff8528ef31b5021c490fd944ab199.zip
docs: update assist comment
-rw-r--r--crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs4
-rw-r--r--crates/ide-assists/src/tests/generated.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs b/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs
index 46d1d7b9553..4f3b6e0c287 100644
--- a/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs
+++ b/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs
@@ -23,7 +23,7 @@ use syntax::{ast, AstNode, AstToken, NodeOrToken, SyntaxKind::COMMA, TextRange};
 // }
 //
 // fn main() {
-//     print!("{x + 1}$0");
+//     print!("{var} {x + 1}$0");
 // }
 // ```
 // ->
@@ -36,7 +36,7 @@ use syntax::{ast, AstNode, AstToken, NodeOrToken, SyntaxKind::COMMA, TextRange};
 // }
 //
 // fn main() {
-//     print!("{}"$0, x + 1);
+//     print!("{var} {}"$0, x + 1);
 // }
 // ```
 
diff --git a/crates/ide-assists/src/tests/generated.rs b/crates/ide-assists/src/tests/generated.rs
index 5e24de62077..f7ff173bb01 100644
--- a/crates/ide-assists/src/tests/generated.rs
+++ b/crates/ide-assists/src/tests/generated.rs
@@ -637,7 +637,7 @@ macro_rules! print {
 }
 
 fn main() {
-    print!("{x + 1}$0");
+    print!("{var} {x + 1}$0");
 }
 "#####,
         r#####"
@@ -649,7 +649,7 @@ macro_rules! print {
 }
 
 fn main() {
-    print!("{}"$0, x + 1);
+    print!("{var} {}"$0, x + 1);
 }
 "#####,
     )