File tree 3 files changed +5
-5
lines changed
crates/proc-macro-srv/src
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ impl Abi {
117
117
let inner = unsafe { Abi_1_63 :: from_lib ( lib, symbol_name) } ?;
118
118
Ok ( Abi :: Abi1_63 ( inner) )
119
119
}
120
- _ => Err ( LoadProcMacroDylibError :: UnsupportedABI ) ,
120
+ _ => Err ( LoadProcMacroDylibError :: UnsupportedABI ( info . version_string . clone ( ) ) ) ,
121
121
}
122
122
}
123
123
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ fn load_library(file: &Path) -> Result<Library, libloading::Error> {
80
80
pub enum LoadProcMacroDylibError {
81
81
Io ( io:: Error ) ,
82
82
LibLoading ( libloading:: Error ) ,
83
- UnsupportedABI ,
83
+ UnsupportedABI ( String ) ,
84
84
}
85
85
86
86
impl fmt:: Display for LoadProcMacroDylibError {
87
87
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
88
88
match self {
89
89
Self :: Io ( e) => e. fmt ( f) ,
90
- Self :: UnsupportedABI => write ! ( f, "unsupported ABI version " ) ,
90
+ Self :: UnsupportedABI ( v ) => write ! ( f, "unsupported ABI `{v}` " ) ,
91
91
Self :: LibLoading ( e) => e. fmt ( f) ,
92
92
}
93
93
}
Original file line number Diff line number Diff line change @@ -113,12 +113,12 @@ impl ProcMacroSrv {
113
113
114
114
fn expander ( & mut self , path : & Path ) -> Result < & dylib:: Expander , String > {
115
115
let time = fs:: metadata ( path) . and_then ( |it| it. modified ( ) ) . map_err ( |err| {
116
- format ! ( "Failed to get file metadata for {}: {:? }" , path. display( ) , err)
116
+ format ! ( "Failed to get file metadata for {}: {}" , path. display( ) , err)
117
117
} ) ?;
118
118
119
119
Ok ( match self . expanders . entry ( ( path. to_path_buf ( ) , time) ) {
120
120
Entry :: Vacant ( v) => v. insert ( dylib:: Expander :: new ( path) . map_err ( |err| {
121
- format ! ( "Cannot create expander for {}: {:? }" , path. display( ) , err)
121
+ format ! ( "Cannot create expander for {}: {}" , path. display( ) , err)
122
122
} ) ?) ,
123
123
Entry :: Occupied ( e) => e. into_mut ( ) ,
124
124
} )
You can’t perform that action at this time.
0 commit comments