1
Fork 0

replace hir().def_kind for def_kind query in rustc_passes

Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
This commit is contained in:
Miguel Guarniz 2022-05-04 16:43:36 -04:00
parent 90685c6333
commit eea16de9f7
3 changed files with 5 additions and 5 deletions

View file

@ -82,7 +82,7 @@ fn find_item(id: ItemId, ctxt: &mut EntryContext<'_>) {
match entry_point_type(ctxt, id, at_root) {
EntryPointType::None => (),
_ if !matches!(ctxt.tcx.hir().def_kind(id.def_id), DefKind::Fn) => {
_ if !matches!(ctxt.tcx.def_kind(id.def_id), DefKind::Fn) => {
let attrs = ctxt.tcx.hir().attrs(id.hir_id());
if let Some(attr) = ctxt.tcx.sess.find_by_name(attrs, sym::start) {
throw_attr_err(&ctxt.tcx.sess, attr.span, "start");