expand a comment

This commit is contained in:
Ralf Jung 2020-06-22 10:26:29 +02:00
parent 7f8fe6a985
commit 5e5ae8b087

View File

@ -226,7 +226,9 @@ pub(super) fn mir_assign_valid_types<'tcx>(
dest: TyAndLayout<'tcx>,
) -> bool {
if src.ty == dest.ty {
// Equal types, all is good.
// Equal types, all is good. Layout will also be equal.
// (Enum variants would be an exception here as they have the type of the enum but different layout.
// However, those are never the type of an assignment.)
return true;
}
if src.layout != dest.layout {