const_eval_select: make it safe but be careful with what we expose on stable for now#121894
Merged
bors merged 2 commits intorust-lang:masterfrom Mar 6, 2024
Merged
const_eval_select: make it safe but be careful with what we expose on stable for now#121894bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
7a88f69 to
4dbd9a9
Compare
This comment has been minimized.
This comment has been minimized.
4dbd9a9 to
8369943
Compare
This comment has been minimized.
This comment has been minimized.
8369943 to
a4bb6f6
Compare
This comment has been minimized.
This comment has been minimized.
a4bb6f6 to
b8b19d0
Compare
This comment has been minimized.
This comment has been minimized.
b8b19d0 to
7bf60f4
Compare
This comment has been minimized.
This comment has been minimized.
7bf60f4 to
374607d
Compare
bjorn3
reviewed
Mar 2, 2024
Contributor
|
@bors r+ rollup |
Collaborator
tgross35
reviewed
Mar 5, 2024
Comment on lines
434
to
+437
| // violated, which is UB. | ||
| unsafe { intrinsics::const_eval_select((bytes,), const_impl, rt_impl) } | ||
| unsafe { | ||
| intrinsics::const_eval_select((bytes,), const_impl, rt_impl) | ||
| } |
Contributor
There was a problem hiding this comment.
Rustfmt changes block wrapping based on whether there is an attribute? 🤔
Contributor
There was a problem hiding this comment.
Weird, asked about it here rust-lang/rustfmt#6106
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 5, 2024
const_eval_select: make it safe but be careful with what we expose on stable for now As this is all still nightly-only I think `@rust-lang/wg-const-eval` can do that without involving t-lang. r? `@oli-obk` Cc `@Nilstrieb` -- the updated version of your RFC would basically say that we can remove these comments about not making behavior differences visible in stable `const fn`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 5, 2024
const_eval_select: make it safe but be careful with what we expose on stable for now As this is all still nightly-only I think ``@rust-lang/wg-const-eval`` can do that without involving t-lang. r? ``@oli-obk`` Cc ``@Nilstrieb`` -- the updated version of your RFC would basically say that we can remove these comments about not making behavior differences visible in stable `const fn`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 5, 2024
const_eval_select: make it safe but be careful with what we expose on stable for now As this is all still nightly-only I think ```@rust-lang/wg-const-eval``` can do that without involving t-lang. r? ```@oli-obk``` Cc ```@Nilstrieb``` -- the updated version of your RFC would basically say that we can remove these comments about not making behavior differences visible in stable `const fn`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 5, 2024
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121301 (errors: share `SilentEmitter` between rustc and rustfmt) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check) - rust-lang#121829 (Dummy tweaks (attempt 2)) - rust-lang#121857 (Implement async closure signature deduction) - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now) - rust-lang#121905 (Add a `description` field to target definitions) - rust-lang#122022 (loongarch: add frecipe and relax target feature) - rust-lang#122028 (Remove some dead code) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 5, 2024
const_eval_select: make it safe but be careful with what we expose on stable for now As this is all still nightly-only I think ````@rust-lang/wg-const-eval```` can do that without involving t-lang. r? ````@oli-obk```` Cc ````@Nilstrieb```` -- the updated version of your RFC would basically say that we can remove these comments about not making behavior differences visible in stable `const fn`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 5, 2024
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check) - rust-lang#121829 (Dummy tweaks (attempt 2)) - rust-lang#121832 (Add new Tier-3 target: `loongarch64-unknown-linux-musl`) - rust-lang#121857 (Implement async closure signature deduction) - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now) - rust-lang#122014 (Change some attributes to only_local.) - rust-lang#122016 (will_wake tests fail on Miri and that is expected) - rust-lang#122018 (only set noalias on Box with the global allocator) - rust-lang#122028 (Remove some dead code) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 5, 2024
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check) - rust-lang#121829 (Dummy tweaks (attempt 2)) - rust-lang#121857 (Implement async closure signature deduction) - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now) - rust-lang#122014 (Change some attributes to only_local.) - rust-lang#122016 (will_wake tests fail on Miri and that is expected) - rust-lang#122018 (only set noalias on Box with the global allocator) - rust-lang#122028 (Remove some dead code) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 6, 2024
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#121065 (Add basic i18n guidance for `Display`) - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check) - rust-lang#121829 (Dummy tweaks (attempt 2)) - rust-lang#121857 (Implement async closure signature deduction) - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now) - rust-lang#122014 (Change some attributes to only_local.) - rust-lang#122016 (will_wake tests fail on Miri and that is expected) - rust-lang#122018 (only set noalias on Box with the global allocator) - rust-lang#122028 (Remove some dead code) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 6, 2024
Rollup merge of rust-lang#121894 - RalfJung:const_eval_select, r=oli-obk const_eval_select: make it safe but be careful with what we expose on stable for now As this is all still nightly-only I think `````@rust-lang/wg-const-eval````` can do that without involving t-lang. r? `````@oli-obk````` Cc `````@Nilstrieb````` -- the updated version of your RFC would basically say that we can remove these comments about not making behavior differences visible in stable `const fn`
Contributor
|
Does this mean that using |
Member
Author
|
@tgross35 I hope the docs are clear enough, let me know if further clarification is needed. |
Contributor
|
Should have read the PR, thanks |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As this is all still nightly-only I think @rust-lang/wg-const-eval can do that without involving t-lang.
r? @oli-obk
Cc @Nilstrieb -- the updated version of your RFC would basically say that we can remove these comments about not making behavior differences visible in stable
const fn