mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
Fix test
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
parent
b9ba9fab5a
commit
638abba05c
1 changed files with 5 additions and 1 deletions
|
@ -156,7 +156,7 @@ fn str_ref_to_string(
|
|||
let edit = TextEdit::insert(expr.syntax().text_range().end(), to_string);
|
||||
let source_change =
|
||||
SourceChange::from_text_edit(d.expr.file_id.original_file(ctx.sema.db), edit);
|
||||
acc.push(fix("str_ref_to_string", "Use to_string() here", source_change, expr_range));
|
||||
acc.push(fix("str_ref_to_string", "Add .to_string() here", source_change, expr_range));
|
||||
|
||||
Some(())
|
||||
}
|
||||
|
@ -530,11 +530,15 @@ fn foo() -> SomeOtherEnum { 0$0 }
|
|||
fn str_ref_to_string() {
|
||||
check_fix(
|
||||
r#"
|
||||
struct String;
|
||||
|
||||
fn test() -> String {
|
||||
"a"$0
|
||||
}
|
||||
"#,
|
||||
r#"
|
||||
struct String;
|
||||
|
||||
fn test() -> String {
|
||||
"a".to_string()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue