Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f0f12d7

Browse files
committed
Remove GeneratorWitness and rename GeneratorWitnessMIR.
1 parent c1625a8 commit f0f12d7

File tree

59 files changed

+89
-329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+89
-329
lines changed

compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ fn push_debuginfo_type_name<'tcx>(
426426
| ty::Placeholder(..)
427427
| ty::Alias(..)
428428
| ty::Bound(..)
429-
| ty::GeneratorWitnessMIR(..)
430429
| ty::GeneratorWitness(..) => {
431430
bug!(
432431
"debuginfo: Trying to create type name for \

compiler/rustc_const_eval/src/const_eval/valtrees.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ pub(crate) fn const_to_valtree_inner<'tcx>(
152152
// FIXME(oli-obk): we can probably encode closures just like structs
153153
| ty::Closure(..)
154154
| ty::Generator(..)
155-
| ty::GeneratorWitness(..) |ty::GeneratorWitnessMIR(..)=> Err(ValTreeCreationError::NonSupportedType),
155+
| ty::GeneratorWitness(..) => Err(ValTreeCreationError::NonSupportedType),
156156
}
157157
}
158158

@@ -280,7 +280,6 @@ pub fn valtree_to_const_value<'tcx>(
280280
| ty::Closure(..)
281281
| ty::Generator(..)
282282
| ty::GeneratorWitness(..)
283-
| ty::GeneratorWitnessMIR(..)
284283
| ty::FnPtr(_)
285284
| ty::RawPtr(_)
286285
| ty::Str

compiler/rustc_const_eval/src/interpret/eval_context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
963963
| ty::Ref(..)
964964
| ty::Generator(..)
965965
| ty::GeneratorWitness(..)
966-
| ty::GeneratorWitnessMIR(..)
967966
| ty::Array(..)
968967
| ty::Closure(..)
969968
| ty::Never

compiler/rustc_const_eval/src/interpret/intrinsics.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ pub(crate) fn eval_nullary_intrinsic<'tcx>(
100100
| ty::Dynamic(_, _, _)
101101
| ty::Closure(_, _)
102102
| ty::Generator(_, _, _)
103-
| ty::GeneratorWitness(_)
104-
| ty::GeneratorWitnessMIR(_, _)
103+
| ty::GeneratorWitness(..)
105104
| ty::Never
106105
| ty::Tuple(_)
107106
| ty::Error(_) => ConstValue::from_target_usize(0u64, &tcx),

compiler/rustc_const_eval/src/interpret/validity.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,6 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
583583
| ty::Bound(..)
584584
| ty::Param(..)
585585
| ty::Alias(..)
586-
| ty::GeneratorWitnessMIR(..)
587586
| ty::GeneratorWitness(..) => bug!("Encountered invalid type {:?}", ty),
588587
}
589588
}

compiler/rustc_const_eval/src/util/type_name.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
6464

6565
ty::Alias(ty::Weak, _) => bug!("type_name: unexpected weak projection"),
6666
ty::Alias(ty::Inherent, _) => bug!("type_name: unexpected inherent projection"),
67-
ty::GeneratorWitness(_) => bug!("type_name: unexpected `GeneratorWitness`"),
68-
ty::GeneratorWitnessMIR(..) => bug!("type_name: unexpected `GeneratorWitnessMIR`"),
67+
ty::GeneratorWitness(..) => bug!("type_name: unexpected `GeneratorWitness`"),
6968
}
7069
}
7170

compiler/rustc_hir_analysis/src/coherence/inherent_impls.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ impl<'tcx> InherentCollect<'tcx> {
157157
| ty::Closure(..)
158158
| ty::Generator(..)
159159
| ty::GeneratorWitness(..)
160-
| ty::GeneratorWitnessMIR(..)
161160
| ty::Bound(..)
162161
| ty::Placeholder(_)
163162
| ty::Infer(_) => {

compiler/rustc_hir_analysis/src/coherence/orphan.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ fn do_orphan_check_impl<'tcx>(
245245
ty::Closure(..)
246246
| ty::Generator(..)
247247
| ty::GeneratorWitness(..)
248-
| ty::GeneratorWitnessMIR(..)
249248
| ty::Bound(..)
250249
| ty::Placeholder(..)
251250
| ty::Infer(..) => {

compiler/rustc_hir_analysis/src/variance/constraints.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
314314
// types, where we use Error as the Self type
315315
}
316316

317-
ty::Placeholder(..)
318-
| ty::GeneratorWitness(..)
319-
| ty::GeneratorWitnessMIR(..)
320-
| ty::Bound(..)
321-
| ty::Infer(..) => {
317+
ty::Placeholder(..) | ty::GeneratorWitness(..) | ty::Bound(..) | ty::Infer(..) => {
322318
bug!("unexpected type encountered in variance inference: {}", ty);
323319
}
324320
}

compiler/rustc_hir_typeck/src/cast.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
129129
| ty::Float(_)
130130
| ty::Array(..)
131131
| ty::GeneratorWitness(..)
132-
| ty::GeneratorWitnessMIR(..)
133132
| ty::RawPtr(_)
134133
| ty::Ref(..)
135134
| ty::FnDef(..)

0 commit comments

Comments
 (0)