diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-29 21:40:42 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-29 21:40:42 +0000 |
commit | be37c3369b4a2203ace1d65d65bf6ddb5c7faa45 (patch) | |
tree | 7e1a4317b0f918e6a78995dca73851e3796c06f7 /crates/ra_cargo_watch/src/conv/snapshots | |
parent | fc77921accbcdf410ea3db6363de9fa3d833eba1 (diff) | |
parent | bca8524fa285f3e583bea7608295c846d71c3315 (diff) |
Merge #2681
2681: cargo-watcher: Resolve macro call site in more cases r=matklad a=kiljacken
This resolves the actual macro call site in a few more cases, f.x. when a macro invokes `compile_error!` (I'm looking at you `ra_hir_def::path::__path`).
Co-authored-by: Emil Lauridsen <[email protected]>
Diffstat (limited to 'crates/ra_cargo_watch/src/conv/snapshots')
-rw-r--r-- | crates/ra_cargo_watch/src/conv/snapshots/test__snap_macro_compiler_error.snap | 61 |
1 files changed, 61 insertions, 0 deletions
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 @@ | |||
1 | --- | ||
2 | source: crates/ra_cargo_watch/src/conv/test.rs | ||
3 | expression: diag | ||
4 | --- | ||
5 | MappedRustDiagnostic { | ||
6 | location: Location { | ||
7 | uri: "file:///test/crates/ra_hir_def/src/data.rs", | ||
8 | range: Range { | ||
9 | start: Position { | ||
10 | line: 79, | ||
11 | character: 15, | ||
12 | }, | ||
13 | end: Position { | ||
14 | line: 79, | ||
15 | character: 41, | ||
16 | }, | ||
17 | }, | ||
18 | }, | ||
19 | diagnostic: Diagnostic { | ||
20 | range: Range { | ||
21 | start: Position { | ||
22 | line: 79, | ||
23 | character: 15, | ||
24 | }, | ||
25 | end: Position { | ||
26 | line: 79, | ||
27 | character: 41, | ||
28 | }, | ||
29 | }, | ||
30 | severity: Some( | ||
31 | Error, | ||
32 | ), | ||
33 | code: None, | ||
34 | source: Some( | ||
35 | "rustc", | ||
36 | ), | ||
37 | message: "Please register your known path in the path module", | ||
38 | related_information: Some( | ||
39 | [ | ||
40 | DiagnosticRelatedInformation { | ||
41 | location: Location { | ||
42 | uri: "file:///test/crates/ra_hir_def/src/path.rs", | ||
43 | range: Range { | ||
44 | start: Position { | ||
45 | line: 264, | ||
46 | character: 8, | ||
47 | }, | ||
48 | end: Position { | ||
49 | line: 264, | ||
50 | character: 76, | ||
51 | }, | ||
52 | }, | ||
53 | }, | ||
54 | message: "Error originated from macro here", | ||
55 | }, | ||
56 | ], | ||
57 | ), | ||
58 | tags: None, | ||
59 | }, | ||
60 | suggested_fixes: [], | ||
61 | } | ||