1
Fork 0

Auto merge of #85908 - cjgillot:private-dep-query, r=Aaron1011

Make is_private_dep a query.

Part of #85153

r? `@Aaron1011`
This commit is contained in:
bors 2021-06-02 08:06:45 +00:00
commit 7350f655ef
5 changed files with 12 additions and 12 deletions

View file

@ -155,6 +155,7 @@ provide! { <'tcx> tcx, def_id, other, cdata,
is_ctfe_mir_available => { cdata.is_ctfe_mir_available(def_id.index) }
dylib_dependency_formats => { cdata.get_dylib_dependency_formats(tcx) }
is_private_dep => { cdata.private_dep }
is_panic_runtime => { cdata.root.panic_runtime }
is_compiler_builtins => { cdata.root.compiler_builtins }
has_global_allocator => { cdata.root.has_global_allocator }
@ -250,6 +251,10 @@ pub fn provide(providers: &mut Providers) {
is_statically_included_foreign_item: |tcx, id| {
matches!(tcx.native_library_kind(id), Some(NativeLibKind::Static { .. }))
},
is_private_dep: |_tcx, cnum| {
assert_eq!(cnum, LOCAL_CRATE);
false
},
native_library_kind: |tcx, id| {
tcx.native_libraries(id.krate)
.iter()
@ -477,10 +482,6 @@ impl CrateStore for CStore {
self.get_crate_data(cnum).root.name
}
fn crate_is_private_dep_untracked(&self, cnum: CrateNum) -> bool {
self.get_crate_data(cnum).private_dep
}
fn stable_crate_id_untracked(&self, cnum: CrateNum) -> StableCrateId {
self.get_crate_data(cnum).root.stable_crate_id
}