Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure enum cast moves #103016

Merged
merged 4 commits into from
Oct 14, 2022
Merged

Ensure enum cast moves #103016

merged 4 commits into from
Oct 14, 2022

Conversation

nbdd0121
Copy link
Contributor

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 13, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 13, 2022
@@ -28,7 +28,7 @@ fn main() {
{
let e = E::C;
assert_eq!(e as u32, 2);
assert_eq!(FLAG.load(Ordering::SeqCst), 0);
assert_eq!(FLAG.load(Ordering::SeqCst), 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I first read this PR, I was concerned that this change to this test does not represent a pure revert of the change in behavior injected by #96862 (see specifically https://github.com/rust-lang/rust/pull/96862/files#diff-7e1f76bb00c9a4c88616e00451baa4b95f56d066d893b0bd781f17dadfcf1338 , which changed a different line in this test).

However, @nbdd0121 has pointed out to me that we never intended to specify how drop interacts with casting of C enums, and in fact #97652 made the pre-existing lint against such casts into a future-incompat error. So I am no longer concerned about the change in behavior to this test.

@pnkfelix
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 13, 2022

📌 Commit 4a25a49 has been approved by pnkfelix

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 13, 2022
@pnkfelix
Copy link
Member

Nominating for backport as #102389 is a P-critical issue that is both stable-to-stable

@rustbot label: +beta-nominated +stable-nominated

@rustbot rustbot added beta-nominated Nominated for backporting to the compiler in the beta channel. stable-nominated Nominated for backporting to the compiler in the stable channel. labels Oct 13, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 13, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 14, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#103000 (Add suggestion to the "missing native library" error)
 - rust-lang#103006 (rustdoc: don't ICE on `TyKind::Typeof`)
 - rust-lang#103008 (replace ReErased with fresh region vars in opaque types)
 - rust-lang#103011 (Improve rustdoc `unsafe-fn` GUI test)
 - rust-lang#103013 (Add new bootstrap entrypoints to triagebot)
 - rust-lang#103016 (Ensure enum cast moves)
 - rust-lang#103021 (Add links to relevant pages to find constraint information)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cf67565 into rust-lang:master Oct 14, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 14, 2022
@nbdd0121 nbdd0121 deleted the enum branch October 14, 2022 15:02
github-actions bot pushed a commit to gnoliyil/fuchsia that referenced this pull request Oct 18, 2022
Rust upstream PR "`as` cast of non-Copy enum is no longer a move" is breaking
newer rust toolchain builds.

Build breaking: https://turquoise-internal-review.googlesource.com/c/integration/+/602949
Upstream PR: rust-lang/rust#103016

Change-Id: I0caba268285ccdb00dd105dec87d2b80a03d3bfb
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/742085
Reviewed-by: Ben Wright <[email protected]>
Reviewed-by: Stephen Demos <[email protected]>
Fuchsia-Auto-Submit: Andrew Pollack <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
@apiraino
Copy link
Contributor

Beta backport accepted as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Oct 20, 2022
@cuviper cuviper mentioned this pull request Oct 20, 2022
@cuviper cuviper modified the milestones: 1.66.0, 1.65.0 Oct 20, 2022
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 20, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 21, 2022
[beta] backports

- Use rebind instead of dummy binder in `SameTypeModuloInfer` relation rust-lang#102059
- Add missing space between notable trait tooltip and where clause rust-lang#102107
- Avoid repeated re-initialization of the BufReader buffer rust-lang#102760
- Ensure enum cast moves rust-lang#103016
- Fix `TyKind::is_simple_path` rust-lang#103176
- Do anonymous lifetimes remapping correctly for nested rpits rust-lang#103205
- [beta] Cargo backport 1.65.0 rust-lang#103303
- linker: Fix weak lang item linking with combination windows-gnu + LLD + LTO rust-lang#103092

r? `@ghost`
@apiraino
Copy link
Contributor

and also stable backport ack'd (Zulip notes)

@rustbot label +stable-accepted

@rustbot rustbot added the stable-accepted Accepted for backporting to the compiler in the stable channel. label Oct 21, 2022
@Mark-Simulacrum Mark-Simulacrum removed stable-nominated Nominated for backporting to the compiler in the stable channel. stable-accepted Accepted for backporting to the compiler in the stable channel. labels Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

as cast of non-Copy enum is no longer a move
8 participants