Rollup merge of #118311 - bvanjoi:merge_coroutinue_into_closure, r=petrochenkov
merge `DefKind::Coroutine` into `Defkind::Closure` Related to #118188 We no longer need to be concerned about the precise type whether it's `DefKind::Closure` or `DefKind::Coroutine`. Furthermore, thanks for the great work done by `@petrochenkov` on investigating https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Why.20does.20it.20hang.20when.20querying.20.EF.BB.BF.60opt_def_kind.60.3F r? `@petrochenkov`
This commit is contained in:
commit
c6d20d70b4
27 changed files with 83 additions and 94 deletions
|
@ -156,8 +156,7 @@ fn assumed_wf_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> &'tcx [(Ty<'
|
|||
| DefKind::Field
|
||||
| DefKind::LifetimeParam
|
||||
| DefKind::GlobalAsm
|
||||
| DefKind::Closure
|
||||
| DefKind::Coroutine => ty::List::empty(),
|
||||
| DefKind::Closure => ty::List::empty(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ fn opaque_types_defined_by<'tcx>(
|
|||
| DefKind::Impl { .. } => {}
|
||||
// Closures and coroutines are type checked with their parent, so we need to allow all
|
||||
// opaques from the closure signature *and* from the parent body.
|
||||
DefKind::Closure | DefKind::Coroutine | DefKind::InlineConst => {
|
||||
DefKind::Closure | DefKind::InlineConst => {
|
||||
collector.opaques.extend(tcx.opaque_types_defined_by(tcx.local_parent(item)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ pub(crate) fn walk_types<'tcx, V: SpannedTypeVisitor<'tcx>>(
|
|||
// These are not part of a public API, they can only appear as hidden types, and there
|
||||
// the interesting parts are solely in the signature of the containing item's opaque type
|
||||
// or dyn type.
|
||||
DefKind::InlineConst | DefKind::Closure | DefKind::Coroutine => {}
|
||||
DefKind::InlineConst | DefKind::Closure => {}
|
||||
DefKind::Impl { of_trait } => {
|
||||
if of_trait {
|
||||
let span = tcx.hir().get_by_def_id(item).expect_item().expect_impl().of_trait.unwrap().path.span;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue