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#100831 - JhonnyBillM:migrate-symbol-manglin…
…g-to-diagnostics-structs, r=davidtwco Migrate `symbol_mangling` module to new diagnostics structs
- Loading branch information
Showing
7 changed files
with
68 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
7 changes: 7 additions & 0 deletions
7
compiler/rustc_error_messages/locales/en-US/symbol_mangling.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,7 @@ | ||
symbol_mangling_invalid_symbol_name = symbol-name({$mangled_formatted}) | ||
symbol_mangling_invalid_trait_item = demangling({$demangling_formatted}) | ||
symbol_mangling_alt_invalid_trait_item = demangling-alt({$alt_demangling_formatted}) | ||
symbol_mangling_invalid_def_path = def-path({$def_path}) |
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,36 @@ | ||
//! Errors emitted by symbol_mangling. | ||
use rustc_macros::SessionDiagnostic; | ||
use rustc_span::Span; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(symbol_mangling::invalid_symbol_name)] | ||
pub struct InvalidSymbolName { | ||
#[primary_span] | ||
pub span: Span, | ||
pub mangled_formatted: String, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(symbol_mangling::invalid_trait_item)] | ||
pub struct InvalidTraitItem { | ||
#[primary_span] | ||
pub span: Span, | ||
pub demangling_formatted: String, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(symbol_mangling::alt_invalid_trait_item)] | ||
pub struct AltInvalidTraitItem { | ||
#[primary_span] | ||
pub span: Span, | ||
pub alt_demangling_formatted: String, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(symbol_mangling::invalid_def_path)] | ||
pub struct InvalidDefPath { | ||
#[primary_span] | ||
pub span: Span, | ||
pub def_path: String, | ||
} |
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