diff options
| author | bors <bors@rust-lang.org> | 2019-05-06 03:11:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-05-06 03:11:14 +0000 |
| commit | eda0699443b076387651c7647fa1cf931c6df2f6 (patch) | |
| tree | b118c18f0bd9794e7cb2916d8283a770933522bc | |
| parent | 46d0ca00ad60710cd3c46398b7a6ea080a9447ed (diff) | |
| parent | dc54cd0c60d079172c8655fc87c49a2250f5b199 (diff) | |
| download | rust-eda0699443b076387651c7647fa1cf931c6df2f6.tar.gz rust-eda0699443b076387651c7647fa1cf931c6df2f6.zip | |
Auto merge of #60569 - RalfJung:miri-visitor-generators, r=Centril
fix typo in enum variant name
| -rw-r--r-- | src/librustc_mir/interpret/validity.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index 1ab612a2f7d..0d3ee830574 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -66,7 +66,7 @@ macro_rules! try_validation { pub enum PathElem { Field(Symbol), Variant(Symbol), - GeneratoreState(VariantIdx), + GeneratorState(VariantIdx), ClosureVar(Symbol), ArrayElem(usize), TupleElem(usize), @@ -101,7 +101,7 @@ fn path_format(path: &Vec<PathElem>) -> String { match elem { Field(name) => write!(out, ".{}", name), Variant(name) => write!(out, ".<downcast-variant({})>", name), - GeneratoreState(idx) => write!(out, ".<generator-state({})>", idx.index()), + GeneratorState(idx) => write!(out, ".<generator-state({})>", idx.index()), ClosureVar(name) => write!(out, ".<closure-var({})>", name), TupleElem(idx) => write!(out, ".{}", idx), ArrayElem(idx) => write!(out, "[{}]", idx), @@ -267,7 +267,7 @@ impl<'rt, 'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> let name = match old_op.layout.ty.sty { ty::Adt(adt, _) => PathElem::Variant(adt.variants[variant_id].ident.name), // Generators also have variants - ty::Generator(..) => PathElem::GeneratoreState(variant_id), + ty::Generator(..) => PathElem::GeneratorState(variant_id), _ => bug!("Unexpected type with variant: {:?}", old_op.layout.ty), }; self.visit_elem(new_op, name) |
