File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
crates/proc-macro-srv/src Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ impl Abi {
117117 let inner = unsafe { Abi_1_63 :: from_lib ( lib, symbol_name) } ?;
118118 Ok ( Abi :: Abi1_63 ( inner) )
119119 }
120- _ => Err ( LoadProcMacroDylibError :: UnsupportedABI ) ,
120+ _ => Err ( LoadProcMacroDylibError :: UnsupportedABI ( info . version_string . clone ( ) ) ) ,
121121 }
122122 }
123123
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ fn load_library(file: &Path) -> Result<Library, libloading::Error> {
8080pub enum LoadProcMacroDylibError {
8181 Io ( io:: Error ) ,
8282 LibLoading ( libloading:: Error ) ,
83- UnsupportedABI ,
83+ UnsupportedABI ( String ) ,
8484}
8585
8686impl fmt:: Display for LoadProcMacroDylibError {
8787 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
8888 match self {
8989 Self :: Io ( e) => e. fmt ( f) ,
90- Self :: UnsupportedABI => write ! ( f, "unsupported ABI version " ) ,
90+ Self :: UnsupportedABI ( v ) => write ! ( f, "unsupported ABI `{v}` " ) ,
9191 Self :: LibLoading ( e) => e. fmt ( f) ,
9292 }
9393 }
Original file line number Diff line number Diff line change @@ -113,12 +113,12 @@ impl ProcMacroSrv {
113113
114114 fn expander ( & mut self , path : & Path ) -> Result < & dylib:: Expander , String > {
115115 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)
117117 } ) ?;
118118
119119 Ok ( match self . expanders . entry ( ( path. to_path_buf ( ) , time) ) {
120120 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)
122122 } ) ?) ,
123123 Entry :: Occupied ( e) => e. into_mut ( ) ,
124124 } )
You can’t perform that action at this time.
0 commit comments