This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from ehuss/fix-edge-cases
Fix some panics in edge cases.
- Loading branch information
Showing
7 changed files
with
107 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"message": "`main` function not found in crate `no_main`", | ||
"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": "no_main.rs", | ||
"byte_start": 26, | ||
"byte_end": 26, | ||
"line_start": 1, | ||
"line_end": 1, | ||
"column_start": 27, | ||
"column_end": 27, | ||
"is_primary": true, | ||
"text": [ | ||
{ | ||
"text": "// This file has no main.", | ||
"highlight_start": 27, | ||
"highlight_end": 27 | ||
} | ||
], | ||
"label": "consider adding a `main` function to `no_main.rs`", | ||
"suggested_replacement": null, | ||
"suggestion_applicability": null, | ||
"expansion": null | ||
} | ||
], | ||
"children": [], | ||
"rendered": "error[E0601]: `main` function not found in crate `no_main`\n --> no_main.rs:1:27\n |\n1 | // This file has no main.\n | ^ consider adding a `main` function to `no_main.rs`\n\n" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// This file has no main. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters