Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make intrinsics::assume const stable #119583

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

AngelicosPhosphoros
Copy link
Contributor

Closes #76972
Blocks #119452

Approved in #119452 (comment)

r? @RalfJung

@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 Jan 4, 2024
@RalfJung
Copy link
Member

RalfJung commented Jan 5, 2024

The intrinsic itself is still unstable so it can't be called from stable code; this just affects whether stable const fn inside core/std can call this intrinsic. LGTM!
Cc @rust-lang/wg-const-eval

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 5, 2024

📌 Commit 59c76fb has been approved by RalfJung

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 Jan 5, 2024
@fee1-dead
Copy link
Member

The intrinsic itself is still unstable so it can't be called from stable code

There is a test for this, right? Just double checking.

@RalfJung
Copy link
Member

RalfJung commented Jan 5, 2024

It's a regular unstable intrinsic. I don't think we need a test for each unstable intrinsic that it can't be called from stable.

Whether we have a test for the general situation of "unstable but const-stable item", I do not know. The machinery for that is not new.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2024
…mpiler-errors

Rollup of 10 pull requests

Successful merges:

 - rust-lang#119034 (Allow coverage tests to ignore test modes, and to enable color in coverage reports)
 - rust-lang#119148 (Tweak suggestions for bare trait used as a type)
 - rust-lang#119538 (Cleanup error handlers: round 5)
 - rust-lang#119566 (Remove `-Zdump-mir-spanview`)
 - rust-lang#119567 (Remove `-Zreport-delayed-bugs`.)
 - rust-lang#119577 (Migrate memory overlap check from validator to lint)
 - rust-lang#119583 (Make `intrinsics::assume` const stable)
 - rust-lang#119586 ([rustdoc] Fix invalid handling for static method calls in jump to definition feature)
 - rust-lang#119588 (Move `i586-unknown-netbsd` from tier 2 to tier 3 platform support table)
 - rust-lang#119601 (`Emitter` cleanups)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8bea1df into rust-lang:master Jan 5, 2024
11 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 5, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 5, 2024
Rollup merge of rust-lang#119583 - AngelicosPhosphoros:const_assume, r=RalfJung

Make `intrinsics::assume` const stable

Closes rust-lang#76972
Blocks rust-lang#119452

Approved in rust-lang#119452 (comment)

r? `@RalfJung`
@AngelicosPhosphoros AngelicosPhosphoros deleted the const_assume branch January 6, 2024 13:03
# for free to join this conversation on GitHub. Already have an account? # 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.

Tracking Issue for const_assume feature
5 participants