replace hir().def_kind for def_kind query in rustc_passes
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
This commit is contained in:
parent
90685c6333
commit
eea16de9f7
3 changed files with 5 additions and 5 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue