Skip to content

Option::as_slice: fix comment #144230

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
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`
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
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