diff options
| author | bors <bors@rust-lang.org> | 2021-06-11 16:11:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-11 16:11:20 +0000 |
| commit | 0a8629bff642c3c3b84bb644c0099194f063b627 (patch) | |
| tree | e4b4f060a7b452eabf45783d8f031a03907e08c3 /compiler/rustc_metadata | |
| parent | dddebf94bccddaa7b8836380c1d90b34553d79d0 (diff) | |
| parent | 4301d1ee7d9badf12a3e08d3642375ee754cdf03 (diff) | |
| download | rust-0a8629bff642c3c3b84bb644c0099194f063b627.tar.gz rust-0a8629bff642c3c3b84bb644c0099194f063b627.zip | |
Auto merge of #85885 - bjorn3:remove_box_region, r=cjgillot
Don't use a generator for BoxedResolver The generator is non-trivial and requires unsafe code anyway. Using regular unsafe code without a generator is much easier to follow. Based on #85810 as it touches rustc_interface too.
Diffstat (limited to 'compiler/rustc_metadata')
| -rw-r--r-- | compiler/rustc_metadata/src/creader.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/src/creader.rs b/compiler/rustc_metadata/src/creader.rs index e9ae22f8ced..d73cfe35dc4 100644 --- a/compiler/rustc_metadata/src/creader.rs +++ b/compiler/rustc_metadata/src/creader.rs @@ -54,7 +54,7 @@ pub struct CStore { pub struct CrateLoader<'a> { // Immutable configuration. sess: &'a Session, - metadata_loader: &'a MetadataLoaderDyn, + metadata_loader: Box<MetadataLoaderDyn>, local_crate_name: Symbol, // Mutable output. cstore: CStore, @@ -219,7 +219,7 @@ impl CStore { impl<'a> CrateLoader<'a> { pub fn new( sess: &'a Session, - metadata_loader: &'a MetadataLoaderDyn, + metadata_loader: Box<MetadataLoaderDyn>, local_crate_name: &str, ) -> Self { let local_crate_stable_id = @@ -544,7 +544,7 @@ impl<'a> CrateLoader<'a> { info!("falling back to a load"); let mut locator = CrateLocator::new( self.sess, - self.metadata_loader, + &*self.metadata_loader, name, hash, host_hash, |
