s/Generator/Coroutine/
This commit is contained in:
parent
96027d945b
commit
60956837cf
310 changed files with 1271 additions and 1271 deletions
|
@ -155,7 +155,7 @@ impl Foldable for RigidTy {
|
|||
RigidTy::FnDef(_, args) => *args = args.fold(folder)?,
|
||||
RigidTy::FnPtr(sig) => *sig = sig.fold(folder)?,
|
||||
RigidTy::Closure(_, args) => *args = args.fold(folder)?,
|
||||
RigidTy::Generator(_, args, _) => *args = args.fold(folder)?,
|
||||
RigidTy::Coroutine(_, args, _) => *args = args.fold(folder)?,
|
||||
RigidTy::Dynamic(pred, r, _) => {
|
||||
*pred = pred.fold(folder)?;
|
||||
*r = r.fold(folder)?;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::ty::{AdtDef, ClosureDef, Const, GeneratorDef, GenericArgs, Movability, Region};
|
||||
use crate::ty::{AdtDef, ClosureDef, Const, CoroutineDef, GenericArgs, Movability, Region};
|
||||
use crate::Opaque;
|
||||
use crate::{ty::Ty, Span};
|
||||
|
||||
|
@ -59,7 +59,7 @@ pub enum TerminatorKind {
|
|||
target: usize,
|
||||
unwind: UnwindAction,
|
||||
},
|
||||
GeneratorDrop,
|
||||
CoroutineDrop,
|
||||
InlineAsm {
|
||||
template: String,
|
||||
operands: Vec<InlineAsmOperand>,
|
||||
|
@ -94,8 +94,8 @@ pub enum AssertMessage {
|
|||
OverflowNeg(Operand),
|
||||
DivisionByZero(Operand),
|
||||
RemainderByZero(Operand),
|
||||
ResumedAfterReturn(GeneratorKind),
|
||||
ResumedAfterPanic(GeneratorKind),
|
||||
ResumedAfterReturn(CoroutineKind),
|
||||
ResumedAfterPanic(CoroutineKind),
|
||||
MisalignedPointerDereference { required: Operand, found: Operand },
|
||||
}
|
||||
|
||||
|
@ -132,13 +132,13 @@ pub enum UnOp {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum GeneratorKind {
|
||||
Async(AsyncGeneratorKind),
|
||||
pub enum CoroutineKind {
|
||||
Async(AsyncCoroutineKind),
|
||||
Gen,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum AsyncGeneratorKind {
|
||||
pub enum AsyncCoroutineKind {
|
||||
Block,
|
||||
Closure,
|
||||
Fn,
|
||||
|
@ -227,8 +227,8 @@ pub enum Rvalue {
|
|||
/// `dest = Foo { x: ..., y: ... }` from `dest.x = ...; dest.y = ...;` in the case that `Foo`
|
||||
/// has a destructor.
|
||||
///
|
||||
/// Disallowed after deaggregation for all aggregate kinds except `Array` and `Generator`. After
|
||||
/// generator lowering, `Generator` aggregate kinds are disallowed too.
|
||||
/// Disallowed after deaggregation for all aggregate kinds except `Array` and `Coroutine`. After
|
||||
/// generator lowering, `Coroutine` aggregate kinds are disallowed too.
|
||||
Aggregate(AggregateKind, Vec<Operand>),
|
||||
|
||||
/// * `Offset` has the same semantics as `<*const T>::offset`, except that the second
|
||||
|
@ -331,7 +331,7 @@ pub enum AggregateKind {
|
|||
Tuple,
|
||||
Adt(AdtDef, VariantIdx, GenericArgs, Option<UserTypeAnnotationIndex>, Option<FieldIdx>),
|
||||
Closure(ClosureDef, GenericArgs),
|
||||
Generator(GeneratorDef, GenericArgs, Movability),
|
||||
Coroutine(CoroutineDef, GenericArgs, Movability),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
|
@ -142,7 +142,7 @@ pub enum RigidTy {
|
|||
FnDef(FnDef, GenericArgs),
|
||||
FnPtr(PolyFnSig),
|
||||
Closure(ClosureDef, GenericArgs),
|
||||
Generator(GeneratorDef, GenericArgs, Movability),
|
||||
Coroutine(CoroutineDef, GenericArgs, Movability),
|
||||
Dynamic(Vec<Binder<ExistentialPredicate>>, Region, DynKind),
|
||||
Never,
|
||||
Tuple(Vec<Ty>),
|
||||
|
@ -196,7 +196,7 @@ impl FnDef {
|
|||
pub struct ClosureDef(pub DefId);
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
pub struct GeneratorDef(pub DefId);
|
||||
pub struct CoroutineDef(pub DefId);
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
pub struct ParamDef(pub DefId);
|
||||
|
|
|
@ -148,7 +148,7 @@ impl Visitable for RigidTy {
|
|||
RigidTy::FnDef(_, args) => args.visit(visitor),
|
||||
RigidTy::FnPtr(sig) => sig.visit(visitor),
|
||||
RigidTy::Closure(_, args) => args.visit(visitor),
|
||||
RigidTy::Generator(_, args, _) => args.visit(visitor),
|
||||
RigidTy::Coroutine(_, args, _) => args.visit(visitor),
|
||||
RigidTy::Dynamic(pred, r, _) => {
|
||||
pred.visit(visitor)?;
|
||||
r.visit(visitor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue