From 9f70f443a35bc12caf37e2548abf7987926c3875 Mon Sep 17 00:00:00 2001 From: Emil Lauridsen Date: Mon, 3 Feb 2020 12:24:57 +0100 Subject: Update snapshot tests due to removed SuggestedFix --- ...watch__conv__test__snap_clippy_pass_by_ref.snap | 48 ++++++++++++++-------- ...h__conv__test__snap_handles_macro_location.snap | 2 +- ...tch__conv__test__snap_macro_compiler_error.snap | 2 +- ...st__snap_rustc_incompatible_type_for_trait.snap | 2 +- ...ch__conv__test__snap_rustc_mismatched_type.snap | 2 +- ...ch__conv__test__snap_rustc_unused_variable.snap | 48 ++++++++++++++-------- ...est__snap_rustc_wrong_number_of_parameters.snap | 2 +- 7 files changed, 67 insertions(+), 39 deletions(-) (limited to 'crates/ra_cargo_watch/src/conv/snapshots') diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_clippy_pass_by_ref.snap b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_clippy_pass_by_ref.snap index cb0920914..95ca163dc 100644 --- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_clippy_pass_by_ref.snap +++ b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_clippy_pass_by_ref.snap @@ -61,25 +61,39 @@ MappedRustDiagnostic { ), tags: None, }, - suggested_fixes: [ - SuggestedFix { + fixes: [ + CodeAction { title: "consider passing by value instead: \'self\'", - location: Location { - uri: "file:///test/compiler/mir/tagset.rs", - range: Range { - start: Position { - line: 41, - character: 23, - }, - end: Position { - line: 41, - character: 28, - }, + kind: Some( + "quickfix", + ), + diagnostics: None, + edit: Some( + WorkspaceEdit { + changes: Some( + { + "file:///test/compiler/mir/tagset.rs": [ + TextEdit { + range: Range { + start: Position { + line: 41, + character: 23, + }, + end: Position { + line: 41, + character: 28, + }, + }, + new_text: "self", + }, + ], + }, + ), + document_changes: None, }, - }, - replacement: "self", - applicability: Unspecified, - diagnostics: [], + ), + command: None, + is_preferred: None, }, ], } diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_handles_macro_location.snap b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_handles_macro_location.snap index 19510ecc1..12eb32df4 100644 --- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_handles_macro_location.snap +++ b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_handles_macro_location.snap @@ -42,5 +42,5 @@ MappedRustDiagnostic { related_information: None, tags: None, }, - suggested_fixes: [], + fixes: [], } diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_macro_compiler_error.snap b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_macro_compiler_error.snap index 92f7eec05..7b83a7cd0 100644 --- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_macro_compiler_error.snap +++ b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_macro_compiler_error.snap @@ -57,5 +57,5 @@ MappedRustDiagnostic { ), tags: None, }, - suggested_fixes: [], + fixes: [], } diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_incompatible_type_for_trait.snap b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_incompatible_type_for_trait.snap index cf683e4b6..54679c5db 100644 --- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_incompatible_type_for_trait.snap +++ b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_incompatible_type_for_trait.snap @@ -42,5 +42,5 @@ MappedRustDiagnostic { related_information: None, tags: None, }, - suggested_fixes: [], + fixes: [], } diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_mismatched_type.snap b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_mismatched_type.snap index 8c1483c74..57df4ceaf 100644 --- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_mismatched_type.snap +++ b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_mismatched_type.snap @@ -42,5 +42,5 @@ MappedRustDiagnostic { related_information: None, tags: None, }, - suggested_fixes: [], + fixes: [], } diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_unused_variable.snap b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_unused_variable.snap index eb5a2247b..3e1fe736c 100644 --- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_unused_variable.snap +++ b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_unused_variable.snap @@ -46,25 +46,39 @@ MappedRustDiagnostic { ], ), }, - suggested_fixes: [ - SuggestedFix { + fixes: [ + CodeAction { title: "consider prefixing with an underscore: \'_foo\'", - location: Location { - uri: "file:///test/driver/subcommand/repl.rs", - range: Range { - start: Position { - line: 290, - character: 8, - }, - end: Position { - line: 290, - character: 11, - }, + kind: Some( + "quickfix", + ), + diagnostics: None, + edit: Some( + WorkspaceEdit { + changes: Some( + { + "file:///test/driver/subcommand/repl.rs": [ + TextEdit { + range: Range { + start: Position { + line: 290, + character: 8, + }, + end: Position { + line: 290, + character: 11, + }, + }, + new_text: "_foo", + }, + ], + }, + ), + document_changes: None, }, - }, - replacement: "_foo", - applicability: MachineApplicable, - diagnostics: [], + ), + command: None, + is_preferred: None, }, ], } diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_wrong_number_of_parameters.snap b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_wrong_number_of_parameters.snap index 2f4518931..69301078d 100644 --- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_wrong_number_of_parameters.snap +++ b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_wrong_number_of_parameters.snap @@ -61,5 +61,5 @@ MappedRustDiagnostic { ), tags: None, }, - suggested_fixes: [], + fixes: [], } -- cgit v1.2.3