1- use rustc_errors:: DiagnosticArgFromDisplay ;
21use rustc_macros:: SessionDiagnostic ;
32use rustc_span:: { Span , Symbol } ;
43
4+ use std:: io;
5+ use std:: path:: Path ;
6+
57#[ derive( SessionDiagnostic ) ]
68#[ diag( interface:: ferris_identifier) ]
79pub struct FerrisIdentifier {
@@ -34,21 +36,21 @@ pub struct ProcMacroDocWithoutArg;
3436#[ derive( SessionDiagnostic ) ]
3537#[ diag( interface:: error_writing_dependencies) ]
3638pub struct ErrorWritingDependencies < ' a > {
37- pub path : DiagnosticArgFromDisplay < ' a > ,
38- pub error : DiagnosticArgFromDisplay < ' a > ,
39+ pub path : & ' a Path ,
40+ pub error : io :: Error ,
3941}
4042
4143#[ derive( SessionDiagnostic ) ]
4244#[ diag( interface:: input_file_would_be_overwritten) ]
4345pub struct InputFileWouldBeOverWritten < ' a > {
44- pub path : DiagnosticArgFromDisplay < ' a > ,
46+ pub path : & ' a Path ,
4547}
4648
4749#[ derive( SessionDiagnostic ) ]
4850#[ diag( interface:: generated_file_conflicts_with_directory) ]
4951pub struct GeneratedFileConflictsWithDirectory < ' a > {
50- pub input_path : DiagnosticArgFromDisplay < ' a > ,
51- pub dir_path : DiagnosticArgFromDisplay < ' a > ,
52+ pub input_path : & ' a Path ,
53+ pub dir_path : & ' a Path ,
5254}
5355
5456#[ derive( SessionDiagnostic ) ]
@@ -61,8 +63,8 @@ pub struct OutDirError;
6163
6264#[ derive( SessionDiagnostic ) ]
6365#[ diag( interface:: cant_emit_mir) ]
64- pub struct CantEmitMIR < ' a > {
65- pub error : DiagnosticArgFromDisplay < ' a > ,
66+ pub struct CantEmitMIR {
67+ pub error : io :: Error ,
6668}
6769
6870#[ derive( SessionDiagnostic ) ]
@@ -82,6 +84,6 @@ pub struct RustcErrorUnexpectedAnnotation {
8284#[ derive( SessionDiagnostic ) ]
8385#[ diag( interface:: failed_writing_file) ]
8486pub struct FailedWritingFile < ' a > {
85- pub path : DiagnosticArgFromDisplay < ' a > ,
86- pub error : DiagnosticArgFromDisplay < ' a > ,
87+ pub path : & ' a Path ,
88+ pub error : io :: Error ,
8789}
0 commit comments