Unnamed repository; edit this file 'description' to name the repository.
docs: update assist comment
unvalley 2023-01-09
parent 872df2f · commit a310fc0
-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 46d1d7b955..4f3b6e0c28 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 5e24de6207..f7ff173bb0 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);
}
"#####,
)