diff options
| author | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2022-08-22 15:58:26 +0200 | 
|---|---|---|
| committer | Giacomo Stevanato <giaco.stevanato@gmail.com> | 2022-08-22 20:09:18 +0200 | 
| commit | 645de5b825987473f02b6ac62cfe915602be4c28 (patch) | |
| tree | e736a65eadfb10a37dc0502ce19ee6968d104cef /compiler/rustc_interface/src/errors.rs | |
| parent | 0d80ee705f8a7acb65b5ecb05ae0e6deaa97bb53 (diff) | |
| download | rust-645de5b825987473f02b6ac62cfe915602be4c28.tar.gz rust-645de5b825987473f02b6ac62cfe915602be4c28.zip | |
Remove use of DiagnosticArgFromDisplay
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
| -rw-r--r-- | compiler/rustc_interface/src/errors.rs | 22 | 
1 files changed, 12 insertions, 10 deletions
| diff --git a/compiler/rustc_interface/src/errors.rs b/compiler/rustc_interface/src/errors.rs index a72134e31f1..6a497aed4ab 100644 --- a/compiler/rustc_interface/src/errors.rs +++ b/compiler/rustc_interface/src/errors.rs @@ -1,7 +1,9 @@ -use rustc_errors::DiagnosticArgFromDisplay; 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 { @@ -34,21 +36,21 @@ pub struct ProcMacroDocWithoutArg; #[derive(SessionDiagnostic)] #[diag(interface::error_writing_dependencies)] pub struct ErrorWritingDependencies<'a> { - pub path: DiagnosticArgFromDisplay<'a>, - pub error: DiagnosticArgFromDisplay<'a>, + pub path: &'a Path, + pub error: io::Error, } #[derive(SessionDiagnostic)] #[diag(interface::input_file_would_be_overwritten)] pub struct InputFileWouldBeOverWritten<'a> { - pub path: DiagnosticArgFromDisplay<'a>, + pub path: &'a Path, } #[derive(SessionDiagnostic)] #[diag(interface::generated_file_conflicts_with_directory)] pub struct GeneratedFileConflictsWithDirectory<'a> { - pub input_path: DiagnosticArgFromDisplay<'a>, - pub dir_path: DiagnosticArgFromDisplay<'a>, + pub input_path: &'a Path, + pub dir_path: &'a Path, } #[derive(SessionDiagnostic)] @@ -61,8 +63,8 @@ pub struct OutDirError; #[derive(SessionDiagnostic)] #[diag(interface::cant_emit_mir)] -pub struct CantEmitMIR<'a> { - pub error: DiagnosticArgFromDisplay<'a>, +pub struct CantEmitMIR { + pub error: io::Error, } #[derive(SessionDiagnostic)] @@ -82,6 +84,6 @@ pub struct RustcErrorUnexpectedAnnotation { #[derive(SessionDiagnostic)] #[diag(interface::failed_writing_file)] pub struct FailedWritingFile<'a> { - pub path: DiagnosticArgFromDisplay<'a>, - pub error: DiagnosticArgFromDisplay<'a>, + pub path: &'a Path, + pub error: io::Error, } | 
