@@ -424,18 +424,18 @@ impl chalk_solve::RustIrDatabase<Interner> for ChalkContext<'_> {
424424 fn fn_def_name ( & self , fn_def_id : chalk_ir:: FnDefId < Interner > ) -> String {
425425 format ! ( "fn_{}" , fn_def_id. 0 )
426426 }
427- fn generator_datum (
427+ fn coroutine_datum (
428428 & self ,
429- id : chalk_ir:: GeneratorId < Interner > ,
430- ) -> Arc < chalk_solve:: rust_ir:: GeneratorDatum < Interner > > {
429+ id : chalk_ir:: CoroutineId < Interner > ,
430+ ) -> Arc < chalk_solve:: rust_ir:: CoroutineDatum < Interner > > {
431431 let ( parent, expr) = self . db . lookup_intern_coroutine ( id. into ( ) ) ;
432432
433433 // We fill substitution with unknown type, because we only need to know whether the generic
434434 // params are types or consts to build `Binders` and those being filled up are for
435435 // `resume_type`, `yield_type`, and `return_type` of the coroutine in question.
436436 let subst = TyBuilder :: subst_for_coroutine ( self . db , parent) . fill_with_unknown ( ) . build ( ) ;
437437
438- let input_output = rust_ir:: GeneratorInputOutputDatum {
438+ let input_output = rust_ir:: CoroutineInputOutputDatum {
439439 resume_type : TyKind :: BoundVar ( BoundVar :: new ( DebruijnIndex :: INNERMOST , 0 ) )
440440 . intern ( Interner ) ,
441441 yield_type : TyKind :: BoundVar ( BoundVar :: new ( DebruijnIndex :: INNERMOST , 1 ) )
@@ -463,25 +463,25 @@ impl chalk_solve::RustIrDatabase<Interner> for ChalkContext<'_> {
463463 Movability :: Movable => rust_ir:: Movability :: Movable ,
464464 } ;
465465
466- Arc :: new ( rust_ir:: GeneratorDatum { movability, input_output } )
466+ Arc :: new ( rust_ir:: CoroutineDatum { movability, input_output } )
467467 }
468- fn generator_witness_datum (
468+ fn coroutine_witness_datum (
469469 & self ,
470- id : chalk_ir:: GeneratorId < Interner > ,
471- ) -> Arc < chalk_solve:: rust_ir:: GeneratorWitnessDatum < Interner > > {
470+ id : chalk_ir:: CoroutineId < Interner > ,
471+ ) -> Arc < chalk_solve:: rust_ir:: CoroutineWitnessDatum < Interner > > {
472472 // FIXME: calculate inner types
473473 let inner_types =
474- rust_ir:: GeneratorWitnessExistential { types : wrap_empty_binders ( vec ! [ ] ) } ;
474+ rust_ir:: CoroutineWitnessExistential { types : wrap_empty_binders ( vec ! [ ] ) } ;
475475
476476 let ( parent, _) = self . db . lookup_intern_coroutine ( id. into ( ) ) ;
477- // See the comment in `generator_datum ()` for unknown types.
477+ // See the comment in `coroutine_datum ()` for unknown types.
478478 let subst = TyBuilder :: subst_for_coroutine ( self . db , parent) . fill_with_unknown ( ) . build ( ) ;
479479 let it = subst
480480 . iter ( Interner )
481481 . map ( |it| it. constant ( Interner ) . map ( |c| c. data ( Interner ) . ty . clone ( ) ) ) ;
482482 let inner_types = crate :: make_type_and_const_binders ( it, inner_types) ;
483483
484- Arc :: new ( rust_ir:: GeneratorWitnessDatum { inner_types } )
484+ Arc :: new ( rust_ir:: CoroutineWitnessDatum { inner_types } )
485485 }
486486
487487 fn unification_database ( & self ) -> & dyn chalk_ir:: UnificationDatabase < Interner > {
@@ -617,7 +617,7 @@ fn well_known_trait_from_lang_item(item: LangItem) -> Option<WellKnownTrait> {
617617 LangItem :: Fn => WellKnownTrait :: Fn ,
618618 LangItem :: FnMut => WellKnownTrait :: FnMut ,
619619 LangItem :: FnOnce => WellKnownTrait :: FnOnce ,
620- LangItem :: Coroutine => WellKnownTrait :: Generator ,
620+ LangItem :: Coroutine => WellKnownTrait :: Coroutine ,
621621 LangItem :: Sized => WellKnownTrait :: Sized ,
622622 LangItem :: Unpin => WellKnownTrait :: Unpin ,
623623 LangItem :: Unsize => WellKnownTrait :: Unsize ,
@@ -639,7 +639,7 @@ fn lang_item_from_well_known_trait(trait_: WellKnownTrait) -> LangItem {
639639 WellKnownTrait :: Fn => LangItem :: Fn ,
640640 WellKnownTrait :: FnMut => LangItem :: FnMut ,
641641 WellKnownTrait :: FnOnce => LangItem :: FnOnce ,
642- WellKnownTrait :: Generator => LangItem :: Coroutine ,
642+ WellKnownTrait :: Coroutine => LangItem :: Coroutine ,
643643 WellKnownTrait :: Sized => LangItem :: Sized ,
644644 WellKnownTrait :: Tuple => LangItem :: Tuple ,
645645 WellKnownTrait :: Unpin => LangItem :: Unpin ,
0 commit comments