From 65f50582cf3e06e6f6dd68d3e5e5b841ac4ea6e9 Mon Sep 17 00:00:00 2001 From: Alexander Regueiro Date: Sat, 15 Dec 2018 14:54:33 +0000 Subject: [PATCH] Removed unnecessary special handling of `VariantCtor` defs in `instantiate_value_path`. --- src/librustc_typeck/check/mod.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index f1bcbf3b6b8a..93d44344a1ea 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -5316,22 +5316,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { } } } - Def::VariantCtor(_, _) if self_ty.is_some() => { - let def_id = def.def_id(); - - let ty = tcx.type_of(def_id); - if tcx.features().type_alias_enum_variants { - if let Some(self_ty) = self_ty { - match ty.ty_adt_def() { - Some(adt_def) if adt_def.is_enum() => { - return (self_ty, def); - } - _ => {} - } - } - } - (def_id, ty) - } _ => { let def_id = def.def_id();