diff options
Diffstat (limited to 'src/tools/cargo/crates/rustfix/tests/edge-cases/empty.json')
-rw-r--r-- | src/tools/cargo/crates/rustfix/tests/edge-cases/empty.json | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/tools/cargo/crates/rustfix/tests/edge-cases/empty.json b/src/tools/cargo/crates/rustfix/tests/edge-cases/empty.json new file mode 100644 index 000000000..62df0b936 --- /dev/null +++ b/src/tools/cargo/crates/rustfix/tests/edge-cases/empty.json @@ -0,0 +1,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" +} |