diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-05-18 17:37:09 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-18 17:37:09 +0530 |
| commit | ea6ac450e20dcd1bd0748354b9d13688ea32bf0f (patch) | |
| tree | c88008e648db235d4174157ebbad2b0c59a49fb3 /compiler/rustc_hir_analysis/src | |
| parent | f5a0c6356b8fd3fed49c744ef6de66bbe03ca56b (diff) | |
| parent | 37209dcddd7ded55e9a725bfab248eddb6def38b (diff) | |
| download | rust-ea6ac450e20dcd1bd0748354b9d13688ea32bf0f.tar.gz rust-ea6ac450e20dcd1bd0748354b9d13688ea32bf0f.zip | |
Rollup merge of #111686 - cjgillot:no-foreign-item, r=compiler-errors
Retire is_foreign_item query. This can be written in terms of `DefKind`. This does not deserve the cost of a query.
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs index 9f00dc418ee..22502bd4fdb 100644 --- a/compiler/rustc_hir_analysis/src/collect.rs +++ b/compiler/rustc_hir_analysis/src/collect.rs @@ -73,7 +73,6 @@ pub fn provide(providers: &mut Providers) { fn_sig, impl_trait_ref, impl_polarity, - is_foreign_item, generator_kind, collect_mod_item_types, is_type_alias_impl_trait, @@ -1466,10 +1465,6 @@ fn compute_sig_of_foreign_fn_decl<'tcx>( fty } -fn is_foreign_item(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool { - matches!(tcx.hir().get_by_def_id(def_id), Node::ForeignItem(..)) -} - fn generator_kind(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<hir::GeneratorKind> { match tcx.hir().get_by_def_id(def_id) { Node::Expr(&rustc_hir::Expr { |
