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

Take lifetime extension into account in ref_as_ptr #12260

Merged
merged 1 commit into from Feb 24, 2024

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Feb 10, 2024

fixes #12255

This should be merged upstream as well. Changing let x = &temp as *const _ into let x = from_ref(&temp) is UB.

changelog: ref_as_ptr: Take lifetime extension into account

@rustbot
Copy link
Collaborator

rustbot commented Feb 10, 2024

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 10, 2024
@bors
Copy link
Collaborator

bors commented Feb 19, 2024

☔ The latest upstream changes (presumably #12306) made this pull request unmergeable. Please resolve the merge conflicts.

@llogiq
Copy link
Contributor

llogiq commented Feb 23, 2024

Sorry for the delay, I was quite sick the last two weeks and am still recovering.

r=me after a rebase.

@Jarcho
Copy link
Contributor Author

Jarcho commented Feb 24, 2024

@bors r=llogiq

Take the time you need to recover.

@bors
Copy link
Collaborator

bors commented Feb 24, 2024

📌 Commit 5ab42d8 has been approved by llogiq

It is now in the queue for this repository.

bors added a commit that referenced this pull request Feb 24, 2024
Take lifetime extension into account in `ref_as_ptr`

fixes #12255

This should be merged upstream as well. Changing `let x = &temp as *const _` into `let x = from_ref(&temp)` is UB.

changelog: `ref_as_ptr`: Take lifetime extension into account
@bors
Copy link
Collaborator

bors commented Feb 24, 2024

⌛ Testing commit 5ab42d8 with merge 8542041...

@bors
Copy link
Collaborator

bors commented Feb 24, 2024

💔 Test failed - checks-action_test

@Jarcho
Copy link
Contributor Author

Jarcho commented Feb 24, 2024

@bors retry

@Jarcho Jarcho added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Feb 24, 2024
@bors
Copy link
Collaborator

bors commented Feb 24, 2024

⌛ Testing commit 5ab42d8 with merge 3bdcbeb...

bors added a commit that referenced this pull request Feb 24, 2024
Take lifetime extension into account in `ref_as_ptr`

fixes #12255

This should be merged upstream as well. Changing `let x = &temp as *const _` into `let x = from_ref(&temp)` is UB.

changelog: `ref_as_ptr`: Take lifetime extension into account
@bors
Copy link
Collaborator

bors commented Feb 24, 2024

💔 Test failed - checks-action_test

@Jarcho
Copy link
Contributor Author

Jarcho commented Feb 24, 2024

@bors retry

@bors
Copy link
Collaborator

bors commented Feb 24, 2024

⌛ Testing commit 5ab42d8 with merge 0597838...

@bors
Copy link
Collaborator

bors commented Feb 24, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 0597838 to master...

@bors bors merged commit 0597838 into rust-lang:master Feb 24, 2024
5 checks passed
@llogiq
Copy link
Contributor

llogiq commented Feb 24, 2024

Third time's the charm. 😄

@flip1995
Copy link
Member

This lint is not in beta yet and this fix made it to master in time. No need for a backport. Thanks for nominating it, would have been a good backport, if necessary. 👍

@flip1995 flip1995 removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FP ref_as_ptr: things that cannot const drop
5 participants