-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate rustc_mir_dataflow to diagnostic structs #100744
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see where
rustc_session
used :-(Probably
SessionDiagnostic
.