-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
translations(rustc_session): migrate the file cgu_reuse_tracker
This commit migrates the errors that indicates an incorrect CGU type and the fatal error that indicates that a CGU has not been correctly recorded
- Loading branch information
Showing
5 changed files
with
60 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
incorrect_cgu_reuse_type = | ||
CGU-reuse for `{$cgu_user_name}` is `{$actual_reuse}` but should be `{$at_least}``${expected_reuse}` | ||
|
||
cgu_not_recorded = | ||
CGU-reuse for `{$cgu_user_name}` is (mangled: `{$cgu_name}`) was not recorded` |
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,22 @@ | ||
use crate as rustc_session; | ||
use crate::cgu_reuse_tracker::CguReuse; | ||
use rustc_macros::SessionDiagnostic; | ||
use rustc_span::Span; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[error(session::incorrect_cgu_reuse_type)] | ||
pub struct IncorrectCguReuseType<'a> { | ||
#[primary_span] | ||
pub span: Span, | ||
pub cgu_user_name: &'a str, | ||
pub actual_reuse: CguReuse, | ||
pub expected_reuse: CguReuse, | ||
pub at_least: &'a str, | ||
} | ||
|
||
// #[derive(SessionDiagnostic)] | ||
// #[fatal(session::cgu_not_recorded)] | ||
// pub struct CguNotRecorded<'a> { | ||
// pub cgu_user_name: &'a str, | ||
// pub cgu_name: &'a str, | ||
// } |
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