Change ty.kind to a method

This commit is contained in:
LeSeulArtichaut
2020-08-03 00:49:11 +02:00
parent ef55a0a92f
commit 3e14b684dd
189 changed files with 947 additions and 899 deletions

View File

@@ -559,7 +559,7 @@ fn switch_on_enum_discriminant(
Some(mir::StatementKind::Assign(box (lhs, mir::Rvalue::Discriminant(discriminated))))
if *lhs == switch_on =>
{
match &discriminated.ty(body, tcx).ty.kind {
match &discriminated.ty(body, tcx).ty.kind() {
ty::Adt(def, _) => Some((*discriminated, def)),
// `Rvalue::Discriminant` is also used to get the active yield point for a