diff options
| author | Ralf Jung <post@ralfj.de> | 2019-05-05 22:53:56 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-05-05 22:53:56 +0200 |
| commit | dc54cd0c60d079172c8655fc87c49a2250f5b199 (patch) | |
| tree | 106ea9ea87357763952bff8ce0e1d09a9358a5b6 | |
| parent | c6b16987645dd8980f40efe7c72d4f3fd4b399d3 (diff) | |
| download | rust-dc54cd0c60d079172c8655fc87c49a2250f5b199.tar.gz rust-dc54cd0c60d079172c8655fc87c49a2250f5b199.zip | |
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 772cbcf9447..12708c074ca 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) |
