Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/builder.rs')
| -rw-r--r-- | crates/hir-ty/src/builder.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/hir-ty/src/builder.rs b/crates/hir-ty/src/builder.rs index 967e028bfb..24a7eb3ff0 100644 --- a/crates/hir-ty/src/builder.rs +++ b/crates/hir-ty/src/builder.rs @@ -227,21 +227,21 @@ impl TyBuilder<()> { TyBuilder::new((), params, parent_subst) } - /// Creates a `TyBuilder` to build `Substitution` for a generator defined in `parent`. + /// Creates a `TyBuilder` to build `Substitution` for a coroutine defined in `parent`. /// - /// A generator's substitution consists of: - /// - resume type of generator - /// - yield type of generator ([`Generator::Yield`](std::ops::Generator::Yield)) - /// - return type of generator ([`Generator::Return`](std::ops::Generator::Return)) + /// A coroutine's substitution consists of: + /// - resume type of coroutine + /// - yield type of coroutine ([`Coroutine::Yield`](std::ops::Coroutine::Yield)) + /// - return type of coroutine ([`Coroutine::Return`](std::ops::Coroutine::Return)) /// - generic parameters in scope on `parent` /// in this order. /// /// This method prepopulates the builder with placeholder substitution of `parent`, so you /// should only push exactly 3 `GenericArg`s before building. - pub fn subst_for_generator(db: &dyn HirDatabase, parent: DefWithBodyId) -> TyBuilder<()> { + pub fn subst_for_coroutine(db: &dyn HirDatabase, parent: DefWithBodyId) -> TyBuilder<()> { let parent_subst = parent.as_generic_def_id().map(|p| generics(db.upcast(), p).placeholder_subst(db)); - // These represent resume type, yield type, and return type of generator. + // These represent resume type, yield type, and return type of coroutine. let params = std::iter::repeat(ParamKind::Type).take(3).collect(); TyBuilder::new((), params, parent_subst) } |