diff options
| author | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-07-16 15:40:33 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-08-24 19:07:50 +0300 |
| commit | 948f19ea8ff76975a77a7cca1e4b42ca8758d3aa (patch) | |
| tree | 8c9b31566ee19bf31e65abdd8dfbc5ca89c5f477 | |
| parent | eec84b31fb6cbac72043017ef81eba0ced658be7 (diff) | |
| download | rust-948f19ea8ff76975a77a7cca1e4b42ca8758d3aa.tar.gz rust-948f19ea8ff76975a77a7cca1e4b42ca8758d3aa.zip | |
Fix typo (variant_id should've been variant_idx).
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 36d4116f846..a462f5d55e3 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -1229,9 +1229,9 @@ pub trait PrettyPrinter<'tcx>: )?; } ty::Adt(def, substs) => { - let variant_id = - contents.variant.expect("destructed const of adt without variant id"); - let variant_def = &def.variants[variant_id]; + let variant_idx = + contents.variant.expect("destructed const of adt without variant idx"); + let variant_def = &def.variants[variant_idx]; p!(print_value_path(variant_def.def_id, substs)); match variant_def.ctor_kind { |
