Put a DefId in AggregateKind.
This commit is contained in:
parent
f3126500f2
commit
0241c29123
10 changed files with 33 additions and 17 deletions
|
@ -453,7 +453,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
|
|||
|
||||
Rvalue::Aggregate(kind, ..) => {
|
||||
if let AggregateKind::Generator(def_id, ..) = kind.as_ref()
|
||||
&& let Some(generator_kind @ hir::GeneratorKind::Async(..)) = self.tcx.generator_kind(def_id.to_def_id())
|
||||
&& let Some(generator_kind @ hir::GeneratorKind::Async(..)) = self.tcx.generator_kind(def_id)
|
||||
{
|
||||
self.check_op(ops::Generator(generator_kind));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue