diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2019-09-28 11:13:40 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2019-09-28 14:06:12 +0200 |
| commit | 44792f108949048c8945a29e6eee6a35c282f210 (patch) | |
| tree | eefff1def9ab11d70b5ed0f0551015c4ab79a17f /src/allocator.rs | |
| parent | cbd65b24d542e0c456f04ac927218120b15a267e (diff) | |
| download | rust-44792f108949048c8945a29e6eee6a35c282f210.tar.gz rust-44792f108949048c8945a29e6eee6a35c282f210.zip | |
Rustup to rustc 1.40.0-nightly (084beb83e 2019-09-27)
Diffstat (limited to 'src/allocator.rs')
| -rw-r--r-- | src/allocator.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/allocator.rs b/src/allocator.rs index d4a1f1a49fa..f4ba22b7d1a 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -13,14 +13,14 @@ use crate::prelude::*; use syntax::ext::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS}; /// Returns whether an allocator shim was created -pub fn codegen(sess: &Session, module: &mut Module<impl Backend + 'static>) -> bool { - let any_dynamic_crate = sess.dependency_formats.borrow().iter().any(|(_, list)| { +pub fn codegen(tcx: TyCtxt<'_>, module: &mut Module<impl Backend + 'static>) -> bool { + let any_dynamic_crate = tcx.dependency_formats(LOCAL_CRATE).iter().any(|(_, list)| { use rustc::middle::dependency_format::Linkage; list.iter().any(|&linkage| linkage == Linkage::Dynamic) }); if any_dynamic_crate { false - } else if let Some(kind) = *sess.allocator_kind.get() { + } else if let Some(kind) = *tcx.sess.allocator_kind.get() { codegen_inner(module, kind); true } else { |
