diff options
| author | bors <bors@rust-lang.org> | 2021-10-01 20:06:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-01 20:06:34 +0000 |
| commit | c02371c442f811878ab3a0f5a813402b6dfd45d2 (patch) | |
| tree | e293105dba102078f3039dba3ddc4f82f7c6c6bb /compiler/rustc_metadata/src/native_libs.rs | |
| parent | b6057bf7b7ee7c58e6a39ead02eaa13b75f908c2 (diff) | |
| parent | 77c300285c0528241b2b08823167598739fc0f82 (diff) | |
Auto merge of #88880 - cjgillot:no-krate, r=oli-obk
Rework HIR API to make invocations of the hir_crate query harder. `hir_crate` forces the recomputation of queries that depend on it. This PR aims at avoiding useless invocations of `hir_crate` by making dependent code go through `tcx.hir()`.
Diffstat (limited to 'compiler/rustc_metadata/src/native_libs.rs')
| -rw-r--r-- | compiler/rustc_metadata/src/native_libs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/native_libs.rs b/compiler/rustc_metadata/src/native_libs.rs index 5ad55dbf5c8..39709e1bd07 100644 --- a/compiler/rustc_metadata/src/native_libs.rs +++ b/compiler/rustc_metadata/src/native_libs.rs @@ -14,7 +14,7 @@ use rustc_target::spec::abi::Abi; crate fn collect(tcx: TyCtxt<'_>) -> Vec<NativeLib> { let mut collector = Collector { tcx, libs: Vec::new() }; - tcx.hir().krate().visit_all_item_likes(&mut collector); + tcx.hir().visit_all_item_likes(&mut collector); collector.process_command_line(); collector.libs } |
