summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/crates/rustfix/tests/edge-cases/empty.json
blob: 62df0b9361ed5afb1daed298456ae12b79776e62 (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
{
  "message": "`main` function not found in crate `empty`",
  "code": {
    "code": "E0601",
    "explanation": "No `main` function was found in a binary crate. To fix this error, add a\n`main` function. For example:\n\n```\nfn main() {\n    // Your program will start here.\n    println!(\"Hello world!\");\n}\n```\n\nIf you don't know the basics of Rust, you can go look to the Rust Book to get\nstarted: https://doc.rust-lang.org/book/\n"
  },
  "level": "error",
  "spans": [
    {
      "file_name": "empty.rs",
      "byte_start": 0,
      "byte_end": 0,
      "line_start": 0,
      "line_end": 0,
      "column_start": 1,
      "column_end": 1,
      "is_primary": true,
      "text": [
        {
          "text": "",
          "highlight_start": 1,
          "highlight_end": 1
        }
      ],
      "label": null,
      "suggested_replacement": null,
      "suggestion_applicability": null,
      "expansion": null
    }
  ],
  "children": [
    {
      "message": "consider adding a `main` function to `empty.rs`",
      "code": null,
      "level": "note",
      "spans": [],
      "children": [],
      "rendered": null
    }
  ],
  "rendered": "error[E0601]: `main` function not found in crate `empty`\n  |\n  = note: consider adding a `main` function to `empty.rs`\n\n"
}