From 428a6ff5b8bad2c80a3522599195bf2a393f744e Mon Sep 17 00:00:00 2001 From: Emil Lauridsen Date: Fri, 27 Dec 2019 11:10:07 +0100 Subject: Move cargo watch functionality to separate crate --- .../test__snap_rustc_unused_variable.snap | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_unused_variable.snap (limited to 'crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_unused_variable.snap') diff --git a/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_unused_variable.snap b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_unused_variable.snap new file mode 100644 index 000000000..eb5a2247b --- /dev/null +++ b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_unused_variable.snap @@ -0,0 +1,70 @@ +--- +source: crates/ra_cargo_watch/src/conv/test.rs +expression: diag +--- +MappedRustDiagnostic { + location: Location { + uri: "file:///test/driver/subcommand/repl.rs", + range: Range { + start: Position { + line: 290, + character: 8, + }, + end: Position { + line: 290, + character: 11, + }, + }, + }, + diagnostic: Diagnostic { + range: Range { + start: Position { + line: 290, + character: 8, + }, + end: Position { + line: 290, + character: 11, + }, + }, + severity: Some( + Warning, + ), + code: Some( + String( + "unused_variables", + ), + ), + source: Some( + "rustc", + ), + message: "unused variable: `foo`\n#[warn(unused_variables)] on by default", + related_information: None, + tags: Some( + [ + Unnecessary, + ], + ), + }, + suggested_fixes: [ + SuggestedFix { + 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, + }, + }, + }, + replacement: "_foo", + applicability: MachineApplicable, + diagnostics: [], + }, + ], +} -- cgit v1.2.3