diff options
Diffstat (limited to 'crates/ra_cargo_watch/src/conv/snapshots')
6 files changed, 358 insertions, 0 deletions
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/test__snap_clippy_pass_by_ref.snap b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_clippy_pass_by_ref.snap new file mode 100644 index 000000000..cb0920914 --- /dev/null +++ b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_clippy_pass_by_ref.snap | |||
@@ -0,0 +1,85 @@ | |||
1 | --- | ||
2 | source: crates/ra_cargo_watch/src/conv/test.rs | ||
3 | expression: diag | ||
4 | --- | ||
5 | MappedRustDiagnostic { | ||
6 | location: Location { | ||
7 | uri: "file:///test/compiler/mir/tagset.rs", | ||
8 | range: Range { | ||
9 | start: Position { | ||
10 | line: 41, | ||
11 | character: 23, | ||
12 | }, | ||
13 | end: Position { | ||
14 | line: 41, | ||
15 | character: 28, | ||
16 | }, | ||
17 | }, | ||
18 | }, | ||
19 | diagnostic: Diagnostic { | ||
20 | range: Range { | ||
21 | start: Position { | ||
22 | line: 41, | ||
23 | character: 23, | ||
24 | }, | ||
25 | end: Position { | ||
26 | line: 41, | ||
27 | character: 28, | ||
28 | }, | ||
29 | }, | ||
30 | severity: Some( | ||
31 | Warning, | ||
32 | ), | ||
33 | code: Some( | ||
34 | String( | ||
35 | "trivially_copy_pass_by_ref", | ||
36 | ), | ||
37 | ), | ||
38 | source: Some( | ||
39 | "clippy", | ||
40 | ), | ||
41 | message: "this argument is passed by reference, but would be more efficient if passed by value\n#[warn(clippy::trivially_copy_pass_by_ref)] implied by #[warn(clippy::all)]\nfor further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref", | ||
42 | related_information: Some( | ||
43 | [ | ||
44 | DiagnosticRelatedInformation { | ||
45 | location: Location { | ||
46 | uri: "file:///test/compiler/lib.rs", | ||
47 | range: Range { | ||
48 | start: Position { | ||
49 | line: 0, | ||
50 | character: 8, | ||
51 | }, | ||
52 | end: Position { | ||
53 | line: 0, | ||
54 | character: 19, | ||
55 | }, | ||
56 | }, | ||
57 | }, | ||
58 | message: "lint level defined here", | ||
59 | }, | ||
60 | ], | ||
61 | ), | ||
62 | tags: None, | ||
63 | }, | ||
64 | suggested_fixes: [ | ||
65 | SuggestedFix { | ||
66 | title: "consider passing by value instead: \'self\'", | ||
67 | location: Location { | ||
68 | uri: "file:///test/compiler/mir/tagset.rs", | ||
69 | range: Range { | ||
70 | start: Position { | ||
71 | line: 41, | ||
72 | character: 23, | ||
73 | }, | ||
74 | end: Position { | ||
75 | line: 41, | ||
76 | character: 28, | ||
77 | }, | ||
78 | }, | ||
79 | }, | ||
80 | replacement: "self", | ||
81 | applicability: Unspecified, | ||
82 | diagnostics: [], | ||
83 | }, | ||
84 | ], | ||
85 | } | ||
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/test__snap_handles_macro_location.snap b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_handles_macro_location.snap new file mode 100644 index 000000000..19510ecc1 --- /dev/null +++ b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_handles_macro_location.snap | |||
@@ -0,0 +1,46 @@ | |||
1 | --- | ||
2 | source: crates/ra_cargo_watch/src/conv/test.rs | ||
3 | expression: diag | ||
4 | --- | ||
5 | MappedRustDiagnostic { | ||
6 | location: Location { | ||
7 | uri: "file:///test/src/main.rs", | ||
8 | range: Range { | ||
9 | start: Position { | ||
10 | line: 1, | ||
11 | character: 4, | ||
12 | }, | ||
13 | end: Position { | ||
14 | line: 1, | ||
15 | character: 26, | ||
16 | }, | ||
17 | }, | ||
18 | }, | ||
19 | diagnostic: Diagnostic { | ||
20 | range: Range { | ||
21 | start: Position { | ||
22 | line: 1, | ||
23 | character: 4, | ||
24 | }, | ||
25 | end: Position { | ||
26 | line: 1, | ||
27 | character: 26, | ||
28 | }, | ||
29 | }, | ||
30 | severity: Some( | ||
31 | Error, | ||
32 | ), | ||
33 | code: Some( | ||
34 | String( | ||
35 | "E0277", | ||
36 | ), | ||
37 | ), | ||
38 | source: Some( | ||
39 | "rustc", | ||
40 | ), | ||
41 | message: "can\'t compare `{integer}` with `&str`\nthe trait `std::cmp::PartialEq<&str>` is not implemented for `{integer}`", | ||
42 | related_information: None, | ||
43 | tags: None, | ||
44 | }, | ||
45 | suggested_fixes: [], | ||
46 | } | ||
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_incompatible_type_for_trait.snap b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_incompatible_type_for_trait.snap new file mode 100644 index 000000000..cf683e4b6 --- /dev/null +++ b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_incompatible_type_for_trait.snap | |||
@@ -0,0 +1,46 @@ | |||
1 | --- | ||
2 | source: crates/ra_cargo_watch/src/conv/test.rs | ||
3 | expression: diag | ||
4 | --- | ||
5 | MappedRustDiagnostic { | ||
6 | location: Location { | ||
7 | uri: "file:///test/compiler/ty/list_iter.rs", | ||
8 | range: Range { | ||
9 | start: Position { | ||
10 | line: 51, | ||
11 | character: 4, | ||
12 | }, | ||
13 | end: Position { | ||
14 | line: 51, | ||
15 | character: 47, | ||
16 | }, | ||
17 | }, | ||
18 | }, | ||
19 | diagnostic: Diagnostic { | ||
20 | range: Range { | ||
21 | start: Position { | ||
22 | line: 51, | ||
23 | character: 4, | ||
24 | }, | ||
25 | end: Position { | ||
26 | line: 51, | ||
27 | character: 47, | ||
28 | }, | ||
29 | }, | ||
30 | severity: Some( | ||
31 | Error, | ||
32 | ), | ||
33 | code: Some( | ||
34 | String( | ||
35 | "E0053", | ||
36 | ), | ||
37 | ), | ||
38 | source: Some( | ||
39 | "rustc", | ||
40 | ), | ||
41 | message: "method `next` has an incompatible type for trait\nexpected type `fn(&mut ty::list_iter::ListIterator<\'list, M>) -> std::option::Option<&ty::Ref<M>>`\n found type `fn(&ty::list_iter::ListIterator<\'list, M>) -> std::option::Option<&\'list ty::Ref<M>>`", | ||
42 | related_information: None, | ||
43 | tags: None, | ||
44 | }, | ||
45 | suggested_fixes: [], | ||
46 | } | ||
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_mismatched_type.snap b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_mismatched_type.snap new file mode 100644 index 000000000..8c1483c74 --- /dev/null +++ b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_mismatched_type.snap | |||
@@ -0,0 +1,46 @@ | |||
1 | --- | ||
2 | source: crates/ra_cargo_watch/src/conv/test.rs | ||
3 | expression: diag | ||
4 | --- | ||
5 | MappedRustDiagnostic { | ||
6 | location: Location { | ||
7 | uri: "file:///test/runtime/compiler_support.rs", | ||
8 | range: Range { | ||
9 | start: Position { | ||
10 | line: 47, | ||
11 | character: 64, | ||
12 | }, | ||
13 | end: Position { | ||
14 | line: 47, | ||
15 | character: 69, | ||
16 | }, | ||
17 | }, | ||
18 | }, | ||
19 | diagnostic: Diagnostic { | ||
20 | range: Range { | ||
21 | start: Position { | ||
22 | line: 47, | ||
23 | character: 64, | ||
24 | }, | ||
25 | end: Position { | ||
26 | line: 47, | ||
27 | character: 69, | ||
28 | }, | ||
29 | }, | ||
30 | severity: Some( | ||
31 | Error, | ||
32 | ), | ||
33 | code: Some( | ||
34 | String( | ||
35 | "E0308", | ||
36 | ), | ||
37 | ), | ||
38 | source: Some( | ||
39 | "rustc", | ||
40 | ), | ||
41 | message: "mismatched types\nexpected usize, found u32", | ||
42 | related_information: None, | ||
43 | tags: None, | ||
44 | }, | ||
45 | suggested_fixes: [], | ||
46 | } | ||
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 @@ | |||
1 | --- | ||
2 | source: crates/ra_cargo_watch/src/conv/test.rs | ||
3 | expression: diag | ||
4 | --- | ||
5 | MappedRustDiagnostic { | ||
6 | location: Location { | ||
7 | uri: "file:///test/driver/subcommand/repl.rs", | ||
8 | range: Range { | ||
9 | start: Position { | ||
10 | line: 290, | ||
11 | character: 8, | ||
12 | }, | ||
13 | end: Position { | ||
14 | line: 290, | ||
15 | character: 11, | ||
16 | }, | ||
17 | }, | ||
18 | }, | ||
19 | diagnostic: Diagnostic { | ||
20 | range: Range { | ||
21 | start: Position { | ||
22 | line: 290, | ||
23 | character: 8, | ||
24 | }, | ||
25 | end: Position { | ||
26 | line: 290, | ||
27 | character: 11, | ||
28 | }, | ||
29 | }, | ||
30 | severity: Some( | ||
31 | Warning, | ||
32 | ), | ||
33 | code: Some( | ||
34 | String( | ||
35 | "unused_variables", | ||
36 | ), | ||
37 | ), | ||
38 | source: Some( | ||
39 | "rustc", | ||
40 | ), | ||
41 | message: "unused variable: `foo`\n#[warn(unused_variables)] on by default", | ||
42 | related_information: None, | ||
43 | tags: Some( | ||
44 | [ | ||
45 | Unnecessary, | ||
46 | ], | ||
47 | ), | ||
48 | }, | ||
49 | suggested_fixes: [ | ||
50 | SuggestedFix { | ||
51 | title: "consider prefixing with an underscore: \'_foo\'", | ||
52 | location: Location { | ||
53 | uri: "file:///test/driver/subcommand/repl.rs", | ||
54 | range: Range { | ||
55 | start: Position { | ||
56 | line: 290, | ||
57 | character: 8, | ||
58 | }, | ||
59 | end: Position { | ||
60 | line: 290, | ||
61 | character: 11, | ||
62 | }, | ||
63 | }, | ||
64 | }, | ||
65 | replacement: "_foo", | ||
66 | applicability: MachineApplicable, | ||
67 | diagnostics: [], | ||
68 | }, | ||
69 | ], | ||
70 | } | ||
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_wrong_number_of_parameters.snap b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_wrong_number_of_parameters.snap new file mode 100644 index 000000000..2f4518931 --- /dev/null +++ b/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_wrong_number_of_parameters.snap | |||
@@ -0,0 +1,65 @@ | |||
1 | --- | ||
2 | source: crates/ra_cargo_watch/src/conv/test.rs | ||
3 | expression: diag | ||
4 | --- | ||
5 | MappedRustDiagnostic { | ||
6 | location: Location { | ||
7 | uri: "file:///test/compiler/ty/select.rs", | ||
8 | range: Range { | ||
9 | start: Position { | ||
10 | line: 103, | ||
11 | character: 17, | ||
12 | }, | ||
13 | end: Position { | ||
14 | line: 103, | ||
15 | character: 29, | ||
16 | }, | ||
17 | }, | ||
18 | }, | ||
19 | diagnostic: Diagnostic { | ||
20 | range: Range { | ||
21 | start: Position { | ||
22 | line: 103, | ||
23 | character: 17, | ||
24 | }, | ||
25 | end: Position { | ||
26 | line: 103, | ||
27 | character: 29, | ||
28 | }, | ||
29 | }, | ||
30 | severity: Some( | ||
31 | Error, | ||
32 | ), | ||
33 | code: Some( | ||
34 | String( | ||
35 | "E0061", | ||
36 | ), | ||
37 | ), | ||
38 | source: Some( | ||
39 | "rustc", | ||
40 | ), | ||
41 | message: "this function takes 2 parameters but 3 parameters were supplied\nexpected 2 parameters", | ||
42 | related_information: Some( | ||
43 | [ | ||
44 | DiagnosticRelatedInformation { | ||
45 | location: Location { | ||
46 | uri: "file:///test/compiler/ty/select.rs", | ||
47 | range: Range { | ||
48 | start: Position { | ||
49 | line: 218, | ||
50 | character: 4, | ||
51 | }, | ||
52 | end: Position { | ||
53 | line: 230, | ||
54 | character: 5, | ||
55 | }, | ||
56 | }, | ||
57 | }, | ||
58 | message: "defined here", | ||
59 | }, | ||
60 | ], | ||
61 | ), | ||
62 | tags: None, | ||
63 | }, | ||
64 | suggested_fixes: [], | ||
65 | } | ||