forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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 rust-lang#100744 - 5225225:migrate-rustc-mir-dataflow…
…, r=davidtwco Migrate rustc_mir_dataflow to diagnostic structs
- Loading branch information
Showing
8 changed files
with
129 additions
and
22 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
29 changes: 29 additions & 0 deletions
29
compiler/rustc_error_messages/locales/en-US/mir_dataflow.ftl
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,29 @@ | ||
mir_dataflow_path_must_end_in_filename = | ||
path must end in a filename | ||
mir_dataflow_unknown_formatter = | ||
unknown formatter | ||
mir_dataflow_duplicate_values_for = | ||
duplicate values for `{$name}` | ||
mir_dataflow_requires_an_argument = | ||
`{$name}` requires an argument | ||
mir_dataflow_stop_after_dataflow_ended_compilation = | ||
stop_after_dataflow ended compilation | ||
mir_dataflow_peek_must_be_place_or_ref_place = | ||
rustc_peek: argument expression must be either `place` or `&place` | ||
mir_dataflow_peek_must_be_not_temporary = | ||
dataflow::sanity_check cannot feed a non-temp to rustc_peek | ||
mir_dataflow_peek_bit_not_set = | ||
rustc_peek: bit not set | ||
mir_dataflow_peek_argument_not_a_local = | ||
rustc_peek: argument was not a local | ||
mir_dataflow_peek_argument_untracked = | ||
rustc_peek: argument untracked |
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,71 @@ | ||
use rustc_macros::SessionDiagnostic; | ||
use rustc_span::{Span, Symbol}; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::path_must_end_in_filename)] | ||
pub(crate) struct PathMustEndInFilename { | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::unknown_formatter)] | ||
pub(crate) struct UnknownFormatter { | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::duplicate_values_for)] | ||
pub(crate) struct DuplicateValuesFor { | ||
#[primary_span] | ||
pub span: Span, | ||
pub name: Symbol, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::requires_an_argument)] | ||
pub(crate) struct RequiresAnArgument { | ||
#[primary_span] | ||
pub span: Span, | ||
pub name: Symbol, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::stop_after_dataflow_ended_compilation)] | ||
pub(crate) struct StopAfterDataFlowEndedCompilation; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::peek_must_be_place_or_ref_place)] | ||
pub(crate) struct PeekMustBePlaceOrRefPlace { | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::peek_must_be_not_temporary)] | ||
pub(crate) struct PeekMustBeNotTemporary { | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::peek_bit_not_set)] | ||
pub(crate) struct PeekBitNotSet { | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::peek_argument_not_a_local)] | ||
pub(crate) struct PeekArgumentNotALocal { | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(mir_dataflow::peek_argument_untracked)] | ||
pub(crate) struct PeekArgumentUntracked { | ||
#[primary_span] | ||
pub span: Span, | ||
} |
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