From 88108bd5d9832a9286b899dc7c8916a9bd104711 Mon Sep 17 00:00:00 2001 From: Miguel Guarniz Date: Sat, 9 Apr 2022 16:03:16 -0400 Subject: [PATCH] add comment about restriction of Target::from_def_kind --- compiler/rustc_hir/src/target.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_hir/src/target.rs b/compiler/rustc_hir/src/target.rs index 682e1167f03..96dd00ec5cf 100644 --- a/compiler/rustc_hir/src/target.rs +++ b/compiler/rustc_hir/src/target.rs @@ -131,6 +131,7 @@ pub fn from_item(item: &Item<'_>) -> Target { } } + // FIXME: For now, should only be used with def_kinds from ItemIds pub fn from_def_kind(def_kind: DefKind) -> Target { match def_kind { DefKind::ExternCrate => Target::ExternCrate,