Skip to content

Commit 65f5058

Browse files
committed
Removed unnecessary special handling of VariantCtor defs in instantiate_value_path.
1 parent 37e7f0a commit 65f5058

File tree

1 file changed

+0
-16
lines changed
  • src/librustc_typeck/check

1 file changed

+0
-16
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5316,22 +5316,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
53165316
}
53175317
}
53185318
}
5319-
Def::VariantCtor(_, _) if self_ty.is_some() => {
5320-
let def_id = def.def_id();
5321-
5322-
let ty = tcx.type_of(def_id);
5323-
if tcx.features().type_alias_enum_variants {
5324-
if let Some(self_ty) = self_ty {
5325-
match ty.ty_adt_def() {
5326-
Some(adt_def) if adt_def.is_enum() => {
5327-
return (self_ty, def);
5328-
}
5329-
_ => {}
5330-
}
5331-
}
5332-
}
5333-
(def_id, ty)
5334-
}
53355319
_ => {
53365320
let def_id = def.def_id();
53375321

0 commit comments

Comments
 (0)