about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Regueiro <alexreg@me.com>2018-12-15 14:54:33 +0000
committerAlexander Regueiro <alexreg@me.com>2018-12-26 21:40:22 +0000
commit65f50582cf3e06e6f6dd68d3e5e5b841ac4ea6e9 (patch)
tree7aa895dfef1f821784e4761f982749e9c0d130b6
parent37e7f0a629db70e19646c8322f3d3b18444577e1 (diff)
downloadrust-65f50582cf3e06e6f6dd68d3e5e5b841ac4ea6e9.tar.gz
rust-65f50582cf3e06e6f6dd68d3e5e5b841ac4ea6e9.zip
Removed unnecessary special handling of `VariantCtor` defs in `instantiate_value_path`.
-rw-r--r--src/librustc_typeck/check/mod.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index f1bcbf3b6b8..93d44344a1e 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();