Change:
_2 = Droppy::C;                  // scope 0 at $DIR/enum_cast.rs:+2:17: +2:26 FakeRead(ForLet(None), _2);      // scope 0 at $DIR/enum_cast.rs:+2:13: +2:14 StorageLive(_3);                 // scope 3 at $DIR/enum_cast.rs:+5:13: +5:14 <del> _4 = discriminant(_2);           // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27 _3 = move _4 as usize (IntToInt); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27 </del> <ins> StorageLive(_4);                 // scope 3 at $DIR/enum_cast.rs:+5:17: +5:18 _4 = move _2;                    // scope 3 at $DIR/enum_cast.rs:+5:17: +5:18 _5 = discriminant(_4);           // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27 _3 = move _5 as usize (IntToInt); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27 drop(_4) -> [return: bb1, unwind: bb4]; // scope 3 at $DIR/enum_cast.rs:+5:26: +5:27 } bb1: { StorageDead(_4);                 // scope 3 at $DIR/enum_cast.rs:+5:26: +5:27 </ins> FakeRead(ForLet(None), _3);      // scope 3 at $DIR/enum_cast.rs:+5:13: +5:14 _1 = const ();                   // scope 0 at $DIR/enum_cast.rs:+1:5: +6:6 StorageDead(_3);                 // scope 1 at $DIR/enum_cast.rs:+6:5: +6:6 <del> drop(_2) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6 </del> <ins> drop(_2) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6 </ins> } <del> bb1: { </del> <ins> bb2: { </ins> StorageDead(_2);                 // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6 StorageDead(_1);                 // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6 <del> StorageLive(_5);                 // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10 _5 = Droppy::B;                  // scope 0 at $DIR/enum_cast.rs:+7:13: +7:22 FakeRead(ForLet(None), _5);      // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10 </del> <ins> StorageLive(_6);                 // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10 _6 = Droppy::B;                  // scope 0 at $DIR/enum_cast.rs:+7:13: +7:22 FakeRead(ForLet(None), _6);      // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10 </ins> _0 = const ();                   // scope 0 at $DIR/enum_cast.rs:+0:13: +8:2 <del> drop(_5) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2 </del> <ins> drop(_6) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2 </ins> } <del> bb2: { StorageDead(_5);                 // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2 </del> <ins> bb3: { StorageDead(_6);                 // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2 </ins> return;                          // scope 0 at $DIR/enum_cast.rs:+8:2: +8:2 } <del> bb3 (cleanup): { </del> <ins> bb4 (cleanup): { drop(_2) -> bb5;                 // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6 } bb5 (cleanup): { </ins> resume;                          // scope 0 at $DIR/enum_cast.rs:+0:1: +8:2 } }

Discussion:
noticed this 1.63→1.64 change in I tried this code: I expected to see this happen: because is non-, an error about moving out from behind a reference, like happened in 1.63 , this happened: it compiles fine in 1.64 in nightly is probably cased by Change enum-int casts to not go through MIR casts which is mentioned in It's unclear to me whether this is intentional under the banner of " behaviour", since there's no trait involved.
Prioritized as P-critical in meeting just now. This needs to be fixed by 1.65 at a minimum.
labels +T-compiler This needs work from T-compiler! :)
labels -I-lang-nominated Meeting consensus is that the current behavior is wrong and needs to be fixed.