aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cargo_watch/src/conv/snapshots/test__snap_rustc_unused_variable.snap
blob: eb5a2247be549e897a2fd35a37a18a4ee6901eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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: [],
        },
    ],
}