add comment about restriction of Target::from_def_kind

This commit is contained in:
Miguel Guarniz 2022-04-09 16:03:16 -04:00
parent a31632b30e
commit 88108bd5d9

View File

@ -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,