From bca8524fa285f3e583bea7608295c846d71c3315 Mon Sep 17 00:00:00 2001 From: Emil Lauridsen Date: Sun, 29 Dec 2019 19:45:54 +0100 Subject: Add related information with original error site --- .../snapshots/test__snap_macro_compiler_error.snap | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 crates/ra_cargo_watch/src/conv/snapshots/test__snap_macro_compiler_error.snap (limited to 'crates/ra_cargo_watch/src/conv/snapshots/test__snap_macro_compiler_error.snap') diff --git a/crates/ra_cargo_watch/src/conv/snapshots/test__snap_macro_compiler_error.snap b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_macro_compiler_error.snap new file mode 100644 index 000000000..92f7eec05 --- /dev/null +++ b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_macro_compiler_error.snap @@ -0,0 +1,61 @@ +--- +source: crates/ra_cargo_watch/src/conv/test.rs +expression: diag +--- +MappedRustDiagnostic { + location: Location { + uri: "file:///test/crates/ra_hir_def/src/data.rs", + range: Range { + start: Position { + line: 79, + character: 15, + }, + end: Position { + line: 79, + character: 41, + }, + }, + }, + diagnostic: Diagnostic { + range: Range { + start: Position { + line: 79, + character: 15, + }, + end: Position { + line: 79, + character: 41, + }, + }, + severity: Some( + Error, + ), + code: None, + source: Some( + "rustc", + ), + message: "Please register your known path in the path module", + related_information: Some( + [ + DiagnosticRelatedInformation { + location: Location { + uri: "file:///test/crates/ra_hir_def/src/path.rs", + range: Range { + start: Position { + line: 264, + character: 8, + }, + end: Position { + line: 264, + character: 76, + }, + }, + }, + message: "Error originated from macro here", + }, + ], + ), + tags: None, + }, + suggested_fixes: [], +} -- cgit v1.2.3