-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
as cast of non-Copy enum is no longer a move #102389
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-criticalCritical priorityCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-criticalCritical priorityCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
@MinusKelvin noticed this 1.63→1.64 change in #102303 (comment)
I tried this code:
I expected to see this happen: because
Enumis non-Copy, an error about moving out from behind a reference, like happened in 1.63 https://rust.godbolt.org/z/vGPqbsE6vInstead, this happened: it compiles fine in 1.64 https://rust.godbolt.org/z/svsPMxTs8 and in nightly https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=817f19e95903785423743c2a8466c189
This is probably cased by
Change enum->int casts to not go through MIR casts #96862
which is mentioned in https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1640-2022-09-22
It's unclear to me whether this is intentional under the banner of "
Dropbehaviour", since there's noDroptrait involved.