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#100808 - SkiFire13:migrate_diagnostics_rust…
…c_interface, r=davidtwco Migrate `rustc_interface` diagnostics ``@rustbot`` label +A-translation r? rust-lang/diagnostics cc rust-lang#100717
- Loading branch information
Showing
5 changed files
with
156 additions
and
62 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
use rustc_macros::SessionDiagnostic; | ||
use rustc_span::{Span, Symbol}; | ||
|
||
use std::io; | ||
use std::path::Path; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::ferris_identifier)] | ||
pub struct FerrisIdentifier { | ||
#[primary_span] | ||
pub spans: Vec<Span>, | ||
#[suggestion(code = "ferris", applicability = "maybe-incorrect")] | ||
pub first_span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::emoji_identifier)] | ||
pub struct EmojiIdentifier { | ||
#[primary_span] | ||
pub spans: Vec<Span>, | ||
pub ident: Symbol, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::mixed_bin_crate)] | ||
pub struct MixedBinCrate; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::mixed_proc_macro_crate)] | ||
pub struct MixedProcMacroCrate; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::proc_macro_doc_without_arg)] | ||
pub struct ProcMacroDocWithoutArg; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::error_writing_dependencies)] | ||
pub struct ErrorWritingDependencies<'a> { | ||
pub path: &'a Path, | ||
pub error: io::Error, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::input_file_would_be_overwritten)] | ||
pub struct InputFileWouldBeOverWritten<'a> { | ||
pub path: &'a Path, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::generated_file_conflicts_with_directory)] | ||
pub struct GeneratedFileConflictsWithDirectory<'a> { | ||
pub input_path: &'a Path, | ||
pub dir_path: &'a Path, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::temps_dir_error)] | ||
pub struct TempsDirError; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::out_dir_error)] | ||
pub struct OutDirError; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::cant_emit_mir)] | ||
pub struct CantEmitMIR { | ||
pub error: io::Error, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::rustc_error_fatal)] | ||
pub struct RustcErrorFatal { | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::rustc_error_unexpected_annotation)] | ||
pub struct RustcErrorUnexpectedAnnotation { | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[diag(interface::failed_writing_file)] | ||
pub struct FailedWritingFile<'a> { | ||
pub path: &'a Path, | ||
pub error: io::Error, | ||
} |
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