Skip to content

Commit

Permalink
Removed unnecessary special handling of VariantCtor defs in `instan…
Browse files Browse the repository at this point in the history
…tiate_value_path`.
  • Loading branch information
Alexander Regueiro committed Dec 26, 2018
1 parent 37e7f0a commit 65f5058
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/librustc_typeck/check/mod.rs
Expand Up @@ -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();

Expand Down

0 comments on commit 65f5058

Please sign in to comment.