1
- use rustc_errors:: DiagnosticArgFromDisplay ;
2
1
use rustc_macros:: SessionDiagnostic ;
3
2
use rustc_span:: { Span , Symbol } ;
4
3
4
+ use std:: io;
5
+ use std:: path:: Path ;
6
+
5
7
#[ derive( SessionDiagnostic ) ]
6
8
#[ diag( interface:: ferris_identifier) ]
7
9
pub struct FerrisIdentifier {
@@ -34,21 +36,21 @@ pub struct ProcMacroDocWithoutArg;
34
36
#[ derive( SessionDiagnostic ) ]
35
37
#[ diag( interface:: error_writing_dependencies) ]
36
38
pub struct ErrorWritingDependencies < ' a > {
37
- pub path : DiagnosticArgFromDisplay < ' a > ,
38
- pub error : DiagnosticArgFromDisplay < ' a > ,
39
+ pub path : & ' a Path ,
40
+ pub error : io :: Error ,
39
41
}
40
42
41
43
#[ derive( SessionDiagnostic ) ]
42
44
#[ diag( interface:: input_file_would_be_overwritten) ]
43
45
pub struct InputFileWouldBeOverWritten < ' a > {
44
- pub path : DiagnosticArgFromDisplay < ' a > ,
46
+ pub path : & ' a Path ,
45
47
}
46
48
47
49
#[ derive( SessionDiagnostic ) ]
48
50
#[ diag( interface:: generated_file_conflicts_with_directory) ]
49
51
pub 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 ,
52
54
}
53
55
54
56
#[ derive( SessionDiagnostic ) ]
@@ -61,8 +63,8 @@ pub struct OutDirError;
61
63
62
64
#[ derive( SessionDiagnostic ) ]
63
65
#[ diag( interface:: cant_emit_mir) ]
64
- pub struct CantEmitMIR < ' a > {
65
- pub error : DiagnosticArgFromDisplay < ' a > ,
66
+ pub struct CantEmitMIR {
67
+ pub error : io :: Error ,
66
68
}
67
69
68
70
#[ derive( SessionDiagnostic ) ]
@@ -82,6 +84,6 @@ pub struct RustcErrorUnexpectedAnnotation {
82
84
#[ derive( SessionDiagnostic ) ]
83
85
#[ diag( interface:: failed_writing_file) ]
84
86
pub struct FailedWritingFile < ' a > {
85
- pub path : DiagnosticArgFromDisplay < ' a > ,
86
- pub error : DiagnosticArgFromDisplay < ' a > ,
87
+ pub path : & ' a Path ,
88
+ pub error : io :: Error ,
87
89
}
0 commit comments