about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-01-17 14:50:24 +0000
committerbors <bors@rust-lang.org>2021-01-17 14:50:24 +0000
commitedeb631ad0cd6fdf31e2e31ec90e105d1768be28 (patch)
tree48c316c067559b3c58d2b652aa836953f0dced5b /compiler/rustc_codegen_ssa/src
parent7d3818152d8ab5649d2e5cc6d7851ed7c03055fe (diff)
parent801684620bd4e0bc12b98a071851e3d3064429e4 (diff)
downloadrust-edeb631ad0cd6fdf31e2e31ec90e105d1768be28.tar.gz
rust-edeb631ad0cd6fdf31e2e31ec90e105d1768be28.zip
Auto merge of #81113 - m-ou-se:rollup-a1unz4x, r=m-ou-se
Rollup of 13 pull requests

Successful merges:

 - #79298 (correctly deal with late-bound lifetimes in anon consts)
 - #80031 (resolve: Reject ambiguity built-in attr vs different built-in attr)
 - #80201 (Add benchmark and fast path for BufReader::read_exact)
 - #80635 (Improve diagnostics when closure doesn't meet trait bound)
 - #80765 (resolve: Simplify collection of traits in scope)
 - #80932 (Allow downloading LLVM on Windows and MacOS)
 - #80983 (Remove is_dllimport_foreign_item definition from cg_ssa)
 - #81064 (Support non-stage0 check)
 - #81080 (Force vec![] to expression position only)
 - #81082 (BTreeMap: clean up a few more comments)
 - #81084 (Use Option::map instead of open-coding it)
 - #81095 (Use Option::unwrap_or instead of open-coding it)
 - #81107 (Add NonZeroUn::is_power_of_two)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/base.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs
index f47d2ada61a..2ce5fe5ad50 100644
--- a/compiler/rustc_codegen_ssa/src/base.rs
+++ b/compiler/rustc_codegen_ssa/src/base.rs
@@ -29,7 +29,6 @@ use rustc_middle::ty::query::Providers;
 use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
 use rustc_session::cgu_reuse_tracker::CguReuse;
 use rustc_session::config::{self, EntryFnType};
-use rustc_session::utils::NativeLibKind;
 use rustc_session::Session;
 use rustc_target::abi::{Align, LayoutOf, VariantIdx};
 
@@ -817,32 +816,6 @@ pub fn provide_both(providers: &mut Providers) {
         }
         tcx.sess.opts.optimize
     };
-
-    providers.dllimport_foreign_items = |tcx, krate| {
-        let module_map = tcx.foreign_modules(krate);
-
-        let dllimports = tcx
-            .native_libraries(krate)
-            .iter()
-            .filter(|lib| {
-                if !matches!(lib.kind, NativeLibKind::Dylib | NativeLibKind::Unspecified) {
-                    return false;
-                }
-                let cfg = match lib.cfg {
-                    Some(ref cfg) => cfg,
-                    None => return true,
-                };
-                attr::cfg_matches(cfg, &tcx.sess.parse_sess, None)
-            })
-            .filter_map(|lib| lib.foreign_module)
-            .map(|id| &module_map[&id])
-            .flat_map(|module| module.foreign_items.iter().cloned())
-            .collect();
-        dllimports
-    };
-
-    providers.is_dllimport_foreign_item =
-        |tcx, def_id| tcx.dllimport_foreign_items(def_id.krate).contains(&def_id);
 }
 
 fn determine_cgu_reuse<'tcx>(tcx: TyCtxt<'tcx>, cgu: &CodegenUnit<'tcx>) -> CguReuse {