Skip to content

Conversation

RalfJung
Copy link
Member

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

@rustbot
Copy link
Collaborator

rustbot commented Jul 20, 2025

r? @thomcc

rustbot has assigned @thomcc.
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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 20, 2025
@RalfJung RalfJung force-pushed the option-as-slice-comment-fix branch from f65cdbc to d2be1c8 Compare July 20, 2025 20:39
@scottmcm
Copy link
Member

Makes sense to me!
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 20, 2025

📌 Commit d2be1c8 has been approved by scottmcm

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 Jul 20, 2025
bors added a commit that referenced this pull request Jul 21, 2025
Rollup of 8 pull requests

Successful merges:

 - #144144 (tests: Skip supported-crate-types test on musl hosts)
 - #144159 (opt-dist: change build_dir field to be an actual build dir)
 - #144162 (Debug impls for DropElaborators)
 - #144189 (Add non-regression test for #144168)
 - #144216 (Don't consider unstable fields always-inhabited)
 - #144229 (Miri subtree update)
 - #144230 (Option::as_slice: fix comment)
 - #144235 (Fix run-make tests on musl hosts)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 21, 2025
Rollup of 8 pull requests

Successful merges:

 - #144144 (tests: Skip supported-crate-types test on musl hosts)
 - #144159 (opt-dist: change build_dir field to be an actual build dir)
 - #144162 (Debug impls for DropElaborators)
 - #144189 (Add non-regression test for #144168)
 - #144216 (Don't consider unstable fields always-inhabited)
 - #144229 (Miri subtree update)
 - #144230 (Option::as_slice: fix comment)
 - #144235 (Fix run-make tests on musl hosts)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 95d9c8d into rust-lang:master Jul 21, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 21, 2025
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`
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Jul 21, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#144144 (tests: Skip supported-crate-types test on musl hosts)
 - rust-lang#144159 (opt-dist: change build_dir field to be an actual build dir)
 - rust-lang#144162 (Debug impls for DropElaborators)
 - rust-lang#144189 (Add non-regression test for rust-lang#144168)
 - rust-lang#144216 (Don't consider unstable fields always-inhabited)
 - rust-lang#144229 (Miri subtree update)
 - rust-lang#144230 (Option::as_slice: fix comment)
 - rust-lang#144235 (Fix run-make tests on musl hosts)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jul 22, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#144144 (tests: Skip supported-crate-types test on musl hosts)
 - rust-lang/rust#144159 (opt-dist: change build_dir field to be an actual build dir)
 - rust-lang/rust#144162 (Debug impls for DropElaborators)
 - rust-lang/rust#144189 (Add non-regression test for rust-lang/rust#144168)
 - rust-lang/rust#144216 (Don't consider unstable fields always-inhabited)
 - rust-lang/rust#144229 (Miri subtree update)
 - rust-lang/rust#144230 (Option::as_slice: fix comment)
 - rust-lang/rust#144235 (Fix run-make tests on musl hosts)

r? `@ghost`
`@rustbot` modify labels: rollup
@RalfJung RalfJung deleted the option-as-slice-comment-fix branch July 23, 2025 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants