-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Merged
Merged
Option::as_slice: fix comment #144230
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f65cdbc
to
d2be1c8
Compare
Makes sense to me! |
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
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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