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:
bors[bot] 2020-12-29 11:45:00 +00:00 committed by GitHub
commit bd18093740
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -502,7 +502,7 @@ fn main() {
#[test]
fn postfix_completion_for_format_like_strings() {
check_edit(
"fmt",
"format",
r#"fn main() { "{some_var:?}".<|> }"#,
r#"fn main() { format!("{:?}", some_var) }"#,
);

View file

@ -22,7 +22,7 @@ use syntax::ast::{self, AstToken};
/// Mapping ("postfix completion item" => "macro to use")
static KINDS: &[(&str, &str)] = &[
("fmt", "format!"),
("format", "format!"),
("panic", "panic!"),
("println", "println!"),
("eprintln", "eprintln!"),