Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir/lower.rs')
-rw-r--r--crates/hir-ty/src/mir/lower.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/hir-ty/src/mir/lower.rs b/crates/hir-ty/src/mir/lower.rs
index 3852db909e..27efc5cfd5 100644
--- a/crates/hir-ty/src/mir/lower.rs
+++ b/crates/hir-ty/src/mir/lower.rs
@@ -2309,10 +2309,7 @@ pub fn mir_body_query<'db>(db: &'db dyn HirDatabase, def: InferBodyId) -> Result
.to_string(),
InferBodyId::DefWithBodyId(DefWithBodyId::VariantId(it)) => {
let loc = it.lookup(db);
- loc.parent.enum_variants(db).variants[loc.index as usize]
- .1
- .display(db, edition)
- .to_string()
+ loc.name.display(db, edition).to_string()
}
InferBodyId::AnonConstId(_) => "{const}".to_owned(),
};