1
Fork 0

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.
This commit is contained in:
Dylan DPC 2023-05-18 17:37:09 +05:30 committed by GitHub
commit ea6ac450e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 20 deletions

View file

@ -726,12 +726,6 @@ rustc_queries! {
desc { |tcx| "checking if item is promotable: `{}`", tcx.def_path_str(key) }
}
/// Returns `true` if this is a foreign item (i.e., linked via `extern { ... }`).
query is_foreign_item(key: DefId) -> bool {
desc { |tcx| "checking if `{}` is a foreign item", tcx.def_path_str(key) }
separate_provide_extern
}
/// Returns `Some(generator_kind)` if the node pointed to by `def_id` is a generator.
query generator_kind(def_id: DefId) -> Option<hir::GeneratorKind> {
desc { |tcx| "looking up generator kind of `{}`", tcx.def_path_str(def_id) }