-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make [].as_[mut_]ptr_range() (unstably) const. #77097
Merged
bors
merged 1 commit into
rust-lang:master
from
fusion-engineering-forks:slice-ptr-range-const-fn
Sep 25, 2020
Merged
Make [].as_[mut_]ptr_range() (unstably) const. #77097
bors
merged 1 commit into
rust-lang:master
from
fusion-engineering-forks:slice-ptr-range-const-fn
Sep 25, 2020
Conversation
This file contains 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
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Sep 23, 2020
cc @RalfJung for two unstably constified fns. |
Cc @rust-lang/wg-const-eval |
josephlr
approved these changes
Sep 23, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and +1 to having as_mut_ptr
behind this feature.
📌 Commit 631c688 has been approved by |
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
Sep 23, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Sep 24, 2020
…range-const-fn, r=oli-obk Make [].as_[mut_]ptr_range() (unstably) const. Gated behind `const_ptr_offset`, as suggested by rust-lang#65807 (comment) This also marks `[].as_mut_ptr()` as const, because it's used by `as_mut_ptr_range`. I gated it behind the same feature, because I figured it's not worth adding a separate tracking issue for const `as_mut_ptr`.
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Sep 25, 2020
…range-const-fn, r=oli-obk Make [].as_[mut_]ptr_range() (unstably) const. Gated behind `const_ptr_offset`, as suggested by rust-lang#65807 (comment) This also marks `[].as_mut_ptr()` as const, because it's used by `as_mut_ptr_range`. I gated it behind the same feature, because I figured it's not worth adding a separate tracking issue for const `as_mut_ptr`.
This was referenced Sep 25, 2020
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 25, 2020
…as-schievink Rollup of 15 pull requests Successful merges: - rust-lang#76932 (Relax promises about condition variable.) - rust-lang#76973 (Unstably allow assume intrinsic in const contexts) - rust-lang#77005 (BtreeMap: refactoring around edges) - rust-lang#77066 (Fix dest prop miscompilation around references) - rust-lang#77073 (dead_code: look at trait impls even if they don't contain items) - rust-lang#77086 (Include libunwind in the rust-src component.) - rust-lang#77097 (Make [].as_[mut_]ptr_range() (unstably) const.) - rust-lang#77106 (clarify that `changelog-seen = 1` goes to the beginning of config.toml) - rust-lang#77120 (Add `--keep-stage-std` to `x.py` for keeping only standard library artifacts) - rust-lang#77126 (Invalidate local LLVM cache less often) - rust-lang#77146 (Install std for non-host targets) - rust-lang#77155 (remove enum name from ImplSource variants) - rust-lang#77176 (Removing erroneous semicolon in transmute documentation) - rust-lang#77183 (Allow multiple allow_internal_unstable attributes) - rust-lang#77189 (Remove extra space from vec drawing) Failed merges: r? `@ghost`
yvt
added a commit
to r3-os/r3
that referenced
this pull request
Dec 5, 2021
<rust-lang/rust#77097> (merged on Sep 26, 2020)
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.
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.
Gated behind
const_ptr_offset
, as suggested by #65807 (comment)This also marks
[].as_mut_ptr()
as const, because it's used byas_mut_ptr_range
. I gated it behind the same feature, because I figured it's not worth adding a separate tracking issue for constas_mut_ptr
.