Skip to content

Conversation

GKFX
Copy link
Contributor

@GKFX GKFX commented Nov 2, 2023

The option_payload_ptr intrinsic is no longer required as offset_of supports traversing enums (#114208). This PR removes it in order to dogfood offset_of (as suggested at #106655 (comment)). However, it will not build until those changes reach beta (which I think is within the next 8 days?) so I've opened it as a draft.

@rustbot
Copy link
Collaborator

rustbot commented Nov 2, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 2, 2023
@rust-log-analyzer

This comment has been minimized.

@GKFX
Copy link
Contributor Author

GKFX commented Nov 3, 2023

@rustbot blocked
@rustbot label F-offset_of

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. F-offset_of `#![feature(offset_of)]` and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 3, 2023
@GKFX GKFX force-pushed the remove_option_payload_ptr branch from e3ced15 to 661df4f Compare November 16, 2023 22:56
@GKFX GKFX marked this pull request as ready for review November 17, 2023 00:04
@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@GKFX
Copy link
Contributor Author

GKFX commented Nov 17, 2023

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Nov 17, 2023
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 17, 2023
@GKFX
Copy link
Contributor Author

GKFX commented Nov 18, 2023

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 18, 2023
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 18, 2023

📌 Commit 58ea02e has been approved by petrochenkov

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 Nov 18, 2023
@bors
Copy link
Collaborator

bors commented Nov 18, 2023

⌛ Testing commit 58ea02e with merge 33688d2...

@bors
Copy link
Collaborator

bors commented Nov 18, 2023

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 33688d2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 18, 2023
@bors bors merged commit 33688d2 into rust-lang:master Nov 18, 2023
@rustbot rustbot added this to the 1.76.0 milestone Nov 18, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (33688d2): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.3% [2.5%, 4.1%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-3.6%, -3.0%] 2
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 678.285s -> 676.282s (-0.30%)
Artifact size: 313.84 MiB -> 313.83 MiB (-0.00%)

@GKFX GKFX deleted the remove_option_payload_ptr branch November 18, 2023 17:00
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 21, 2025
…ix, r=scottmcm

Option::as_slice: fix comment

The implementation got changed in rust-lang#117525 without updating the comment. Now the comment makes no sense any more since there is no intrinsic that returns a pointer in this function any more.

(It is also very strange to say "in the new version" in a comment -- what is that supposed to tell someone reading the code 2 years later? That wording was introduced even earlier, in rust-lang#109179.)

Cc `@GKFX` `@petrochenkov` `@llogiq` `@scottmcm`
rust-timer added a commit that referenced this pull request Jul 21, 2025
Rollup merge of #144230 - RalfJung:option-as-slice-comment-fix, r=scottmcm

Option::as_slice: fix comment

The implementation got changed in #117525 without updating the comment. Now the comment makes no sense any more since there is no intrinsic that returns a pointer in this function any more.

(It is also very strange to say "in the new version" in a comment -- what is that supposed to tell someone reading the code 2 years later? That wording was introduced even earlier, in #109179.)

Cc `@GKFX` `@petrochenkov` `@llogiq` `@scottmcm`
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Jul 21, 2025
…ix, r=scottmcm

Option::as_slice: fix comment

The implementation got changed in rust-lang#117525 without updating the comment. Now the comment makes no sense any more since there is no intrinsic that returns a pointer in this function any more.

(It is also very strange to say "in the new version" in a comment -- what is that supposed to tell someone reading the code 2 years later? That wording was introduced even earlier, in rust-lang#109179.)

Cc `@GKFX` `@petrochenkov` `@llogiq` `@scottmcm`
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jul 22, 2025
…ttmcm

Option::as_slice: fix comment

The implementation got changed in rust-lang/rust#117525 without updating the comment. Now the comment makes no sense any more since there is no intrinsic that returns a pointer in this function any more.

(It is also very strange to say "in the new version" in a comment -- what is that supposed to tell someone reading the code 2 years later? That wording was introduced even earlier, in rust-lang/rust#109179.)

Cc `@GKFX` `@petrochenkov` `@llogiq` `@scottmcm`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-offset_of `#![feature(offset_of)]` merged-by-bors This PR was explicitly merged by bors. 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. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants