-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #100890 - adriantombu:migrate_diagnostic_rustc_driver…
…, r=davidtwco Migrate rustc_driver to SessionDiagnostic First timer noob here 👋🏽 I'm having a problem understanding how I can retrieve the span, and how to properly construct the error structs to avoid the current compilation errors. Any help pointing me in the right direction would be much appreciated 🙌🏽
- Loading branch information
Showing
7 changed files
with
95 additions
and
12 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
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
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 @@ | ||
use rustc_macros::SessionDiagnostic; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(driver::rlink_unable_to_read)] | ||
pub(crate) struct RlinkUnableToRead { | ||
pub err: std::io::Error, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(driver::rlink_wrong_file_type)] | ||
pub(crate) struct RLinkWrongFileType; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(driver::rlink_empty_version_number)] | ||
pub(crate) struct RLinkEmptyVersionNumber; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(driver::rlink_encoding_version_mismatch)] | ||
pub(crate) struct RLinkEncodingVersionMismatch { | ||
pub version_array: String, | ||
pub rlink_version: u32, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(driver::rlink_rustc_version_mismatch)] | ||
pub(crate) struct RLinkRustcVersionMismatch<'a> { | ||
pub rustc_version: String, | ||
pub current_version: &'a str, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(driver::rlink_no_a_file)] | ||
pub(crate) struct RlinkNotAFile; |
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,11 @@ | ||
driver_rlink_unable_to_read = failed to read rlink file: `{$err}` | ||
driver_rlink_wrong_file_type = The input does not look like a .rlink file | ||
driver_rlink_empty_version_number = The input does not contain version number | ||
driver_rlink_encoding_version_mismatch = .rlink file was produced with encoding version `{$version_array}`, but the current version is `{$rlink_version}` | ||
driver_rlink_rustc_version_mismatch = .rlink file was produced by rustc version `{$rustc_version}`, but the current version is `{$current_version}` | ||
driver_rlink_no_a_file = rlink must be a 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