mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Merge #7075
7075: format-postfix completion takes format instead of fmt r=lnicola a=Veykril See https://github.com/rust-analyzer/rust-analyzer/issues/6843 this brings it back in line with the documentation Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
bd18093740
2 changed files with 2 additions and 2 deletions
|
@ -502,7 +502,7 @@ fn main() {
|
||||||
#[test]
|
#[test]
|
||||||
fn postfix_completion_for_format_like_strings() {
|
fn postfix_completion_for_format_like_strings() {
|
||||||
check_edit(
|
check_edit(
|
||||||
"fmt",
|
"format",
|
||||||
r#"fn main() { "{some_var:?}".<|> }"#,
|
r#"fn main() { "{some_var:?}".<|> }"#,
|
||||||
r#"fn main() { format!("{:?}", some_var) }"#,
|
r#"fn main() { format!("{:?}", some_var) }"#,
|
||||||
);
|
);
|
||||||
|
|
|
@ -22,7 +22,7 @@ use syntax::ast::{self, AstToken};
|
||||||
|
|
||||||
/// Mapping ("postfix completion item" => "macro to use")
|
/// Mapping ("postfix completion item" => "macro to use")
|
||||||
static KINDS: &[(&str, &str)] = &[
|
static KINDS: &[(&str, &str)] = &[
|
||||||
("fmt", "format!"),
|
("format", "format!"),
|
||||||
("panic", "panic!"),
|
("panic", "panic!"),
|
||||||
("println", "println!"),
|
("println", "println!"),
|
||||||
("eprintln", "eprintln!"),
|
("eprintln", "eprintln!"),
|
||||||
|
|
Loading…
Reference in a new issue