s/Generator/Coroutine/
This commit is contained in:
parent
96027d945b
commit
60956837cf
310 changed files with 1271 additions and 1271 deletions
|
@ -214,7 +214,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolPrinter<'tcx> {
|
|||
ty::FnDef(def_id, args)
|
||||
| ty::Alias(ty::Projection | ty::Opaque, ty::AliasTy { def_id, args, .. })
|
||||
| ty::Closure(def_id, args)
|
||||
| ty::Generator(def_id, args, _) => self.print_def_path(def_id, args),
|
||||
| ty::Coroutine(def_id, args, _) => self.print_def_path(def_id, args),
|
||||
|
||||
// The `pretty_print_type` formatting of array size depends on
|
||||
// -Zverbose flag, so we cannot reuse it here.
|
||||
|
@ -284,7 +284,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolPrinter<'tcx> {
|
|||
// Similar to `pretty_path_qualified`, but for the other
|
||||
// types that are printed as paths (see `print_type` above).
|
||||
match self_ty.kind() {
|
||||
ty::FnDef(..) | ty::Alias(..) | ty::Closure(..) | ty::Generator(..)
|
||||
ty::FnDef(..) | ty::Alias(..) | ty::Closure(..) | ty::Coroutine(..)
|
||||
if trait_ref.is_none() =>
|
||||
{
|
||||
self.print_type(self_ty)
|
||||
|
|
|
@ -238,7 +238,7 @@ fn compute_symbol_name<'tcx>(
|
|||
// and we want to be sure to avoid any symbol conflicts here.
|
||||
let is_globally_shared_function = matches!(
|
||||
tcx.def_kind(instance.def_id()),
|
||||
DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Generator | DefKind::Ctor(..)
|
||||
DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Coroutine | DefKind::Ctor(..)
|
||||
) && matches!(
|
||||
MonoItem::Fn(instance).instantiation_mode(tcx),
|
||||
InstantiationMode::GloballyShared { may_conflict: true }
|
||||
|
|
|
@ -639,7 +639,7 @@ fn encode_ty<'tcx>(
|
|||
typeid.push_str(&s);
|
||||
}
|
||||
|
||||
ty::Generator(def_id, args, ..) => {
|
||||
ty::Coroutine(def_id, args, ..) => {
|
||||
// u<length><name>[I<element-type1..element-typeN>E], where <element-type> is <subst>,
|
||||
// as vendor extended type.
|
||||
let mut s = String::new();
|
||||
|
@ -719,7 +719,7 @@ fn encode_ty<'tcx>(
|
|||
ty::Alias(..)
|
||||
| ty::Bound(..)
|
||||
| ty::Error(..)
|
||||
| ty::GeneratorWitness(..)
|
||||
| ty::CoroutineWitness(..)
|
||||
| ty::Infer(..)
|
||||
| ty::Placeholder(..) => {
|
||||
bug!("encode_ty: unexpected `{:?}`", ty.kind());
|
||||
|
@ -778,7 +778,7 @@ fn transform_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, options: TransformTyOptio
|
|||
| ty::Str
|
||||
| ty::Never
|
||||
| ty::Foreign(..)
|
||||
| ty::GeneratorWitness(..) => {}
|
||||
| ty::CoroutineWitness(..) => {}
|
||||
|
||||
ty::Bool => {
|
||||
if options.contains(EncodeTyOptions::NORMALIZE_INTEGERS) {
|
||||
|
@ -892,7 +892,7 @@ fn transform_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, options: TransformTyOptio
|
|||
ty = Ty::new_closure(tcx, *def_id, transform_args(tcx, args, options));
|
||||
}
|
||||
|
||||
ty::Generator(def_id, args, movability) => {
|
||||
ty::Coroutine(def_id, args, movability) => {
|
||||
ty = Ty::new_generator(tcx, *def_id, transform_args(tcx, args, options), *movability);
|
||||
}
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
|
|||
| ty::FnDef(def_id, args)
|
||||
| ty::Alias(ty::Projection | ty::Opaque, ty::AliasTy { def_id, args, .. })
|
||||
| ty::Closure(def_id, args)
|
||||
| ty::Generator(def_id, args, _) => {
|
||||
| ty::Coroutine(def_id, args, _) => {
|
||||
self = self.print_def_path(def_id, args)?;
|
||||
}
|
||||
ty::Foreign(def_id) => {
|
||||
|
@ -476,7 +476,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
|
|||
|
||||
ty::Alias(ty::Inherent, _) => bug!("symbol_names: unexpected inherent projection"),
|
||||
ty::Alias(ty::Weak, _) => bug!("symbol_names: unexpected weak projection"),
|
||||
ty::GeneratorWitness(..) => bug!("symbol_names: unexpected `GeneratorWitness`"),
|
||||
ty::CoroutineWitness(..) => bug!("symbol_names: unexpected `CoroutineWitness`"),
|
||||
}
|
||||
|
||||
// Only cache types that do not refer to an enclosing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue