File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ enum LoadError<'a> {
95
95
impl < ' a > LoadError < ' a > {
96
96
fn report ( self ) -> ! {
97
97
match self {
98
- LoadError :: LocatorError ( mut locate_ctxt) => locate_ctxt. report_errs ( ) ,
98
+ LoadError :: LocatorError ( locate_ctxt) => locate_ctxt. report_errs ( ) ,
99
99
}
100
100
}
101
101
}
@@ -365,8 +365,8 @@ impl<'a> CrateLoader<'a> {
365
365
span,
366
366
ident,
367
367
crate_name : name,
368
- hash : hash . map ( |a| & * a ) ,
369
- extra_filename : extra_filename ,
368
+ hash,
369
+ extra_filename,
370
370
filesearch : self . sess . target_filesearch ( path_kind) ,
371
371
target : & self . sess . target . target ,
372
372
triple : self . sess . opts . target_triple . clone ( ) ,
Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ impl<'a> Context<'a> {
321
321
}
322
322
}
323
323
324
- pub fn report_errs ( & mut self ) -> ! {
324
+ pub fn report_errs ( self ) -> ! {
325
325
let add = match self . root {
326
326
& None => String :: new ( ) ,
327
327
& Some ( ref r) => format ! ( " which `{}` depends on" , r. ident) ,
@@ -901,8 +901,7 @@ fn get_metadata_section_imp(target: &Target,
901
901
let mut inflated = Vec :: new ( ) ;
902
902
match DeflateDecoder :: new ( compressed_bytes) . read_to_end ( & mut inflated) {
903
903
Ok ( _) => {
904
- let buf = unsafe { OwningRef :: new_assert_stable_address ( inflated) } ;
905
- rustc_erase_owner ! ( buf. map_owner_box( ) )
904
+ rustc_erase_owner ! ( OwningRef :: new( inflated) . map_owner_box( ) )
906
905
}
907
906
Err ( _) => {
908
907
return Err ( format ! ( "failed to decompress metadata: {}" , filename. display( ) ) ) ;
You can’t perform that action at this time.
0 commit comments