Skip to content

Commit eda0699

Browse files
committed
Auto merge of #60569 - RalfJung:miri-visitor-generators, r=Centril
fix typo in enum variant name
2 parents 46d0ca0 + dc54cd0 commit eda0699

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_mir/interpret/validity.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ macro_rules! try_validation {
6666
pub enum PathElem {
6767
Field(Symbol),
6868
Variant(Symbol),
69-
GeneratoreState(VariantIdx),
69+
GeneratorState(VariantIdx),
7070
ClosureVar(Symbol),
7171
ArrayElem(usize),
7272
TupleElem(usize),
@@ -101,7 +101,7 @@ fn path_format(path: &Vec<PathElem>) -> String {
101101
match elem {
102102
Field(name) => write!(out, ".{}", name),
103103
Variant(name) => write!(out, ".<downcast-variant({})>", name),
104-
GeneratoreState(idx) => write!(out, ".<generator-state({})>", idx.index()),
104+
GeneratorState(idx) => write!(out, ".<generator-state({})>", idx.index()),
105105
ClosureVar(name) => write!(out, ".<closure-var({})>", name),
106106
TupleElem(idx) => write!(out, ".{}", idx),
107107
ArrayElem(idx) => write!(out, "[{}]", idx),
@@ -267,7 +267,7 @@ impl<'rt, 'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>>
267267
let name = match old_op.layout.ty.sty {
268268
ty::Adt(adt, _) => PathElem::Variant(adt.variants[variant_id].ident.name),
269269
// Generators also have variants
270-
ty::Generator(..) => PathElem::GeneratoreState(variant_id),
270+
ty::Generator(..) => PathElem::GeneratorState(variant_id),
271271
_ => bug!("Unexpected type with variant: {:?}", old_op.layout.ty),
272272
};
273273
self.visit_elem(new_op, name)

0 commit comments

Comments
 (0)