-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
rust-analyzer version: rust-analyzer version: 0.3.1860-standalone
rustc version: rustc 1.76.0 (07dca489a 2024-02-04)
code snippet to reproduce:
Add the following test in rust-analyzer/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs
#[test]
fn escaped_literals() {
check_assist(
extract_expressions_from_format_string,
&add_macro_decl(
r#"
fn main() {
print!("\n {x + 1}$0");
}
"#,
),
&add_macro_decl(
r#"
fn main() {
print!("\n {}"$0, x + 1);
}
"#,
),
);
}
fails and instead produces
fn main() {
print!("\\n {}"$0, x + 1);
}