Skip to content

Commit 638abba

Browse files
committed
Fix test
Signed-off-by: hi-rustin <[email protected]>
1 parent b9ba9fa commit 638abba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/ide-diagnostics/src/handlers/type_mismatch.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ fn str_ref_to_string(
156156
let edit = TextEdit::insert(expr.syntax().text_range().end(), to_string);
157157
let source_change =
158158
SourceChange::from_text_edit(d.expr.file_id.original_file(ctx.sema.db), edit);
159-
acc.push(fix("str_ref_to_string", "Use to_string() here", source_change, expr_range));
159+
acc.push(fix("str_ref_to_string", "Add .to_string() here", source_change, expr_range));
160160

161161
Some(())
162162
}
@@ -530,11 +530,15 @@ fn foo() -> SomeOtherEnum { 0$0 }
530530
fn str_ref_to_string() {
531531
check_fix(
532532
r#"
533+
struct String;
534+
533535
fn test() -> String {
534536
"a"$0
535537
}
536538
"#,
537539
r#"
540+
struct String;
541+
538542
fn test() -> String {
539543
"a".to_string()
540544
}

0 commit comments

Comments
 (0)