Skip to content

Organize intrinsics promotion checks - #66275

Merged
bors merged 8 commits into
rust-lang:masterfrom
oli-obk:organize-intrinsics-promotion-checks
Dec 4, 2019
Merged

Organize intrinsics promotion checks#66275
bors merged 8 commits into
rust-lang:masterfrom
oli-obk:organize-intrinsics-promotion-checks

Conversation

@oli-obk

@oli-obk oli-obk commented Nov 10, 2019

Copy link
Copy Markdown
Contributor

cc @vertexclique

supersedes #61835

r? @RalfJung

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 10, 2019
Comment thread src/librustc_mir/transform/qualify_consts.rs Outdated
Comment thread src/libcore/intrinsics.rs Outdated
Comment thread src/librustc/ty/constness.rs Outdated
Comment thread src/librustc/ty/constness.rs Outdated
Comment thread src/librustc/ty/constness.rs Outdated
Comment thread src/librustc_mir/transform/qualify_consts.rs Outdated
Comment thread src/test/ui/consts/const-eval/const-eval-intrinsic-promotion.rs Outdated
@oli-obk
oli-obk force-pushed the organize-intrinsics-promotion-checks branch from bb353a0 to 22bef04 Compare November 15, 2019 20:19
Comment thread src/librustc/ty/constness.rs Outdated
@bors

This comment has been minimized.

@RalfJung RalfJung added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 19, 2019
@oli-obk
oli-obk force-pushed the organize-intrinsics-promotion-checks branch from 22bef04 to 9d30d2f Compare November 21, 2019 14:53
@rust-highfive

This comment has been minimized.

@bors

This comment has been minimized.

Comment thread src/librustc_metadata/rmeta/decoder.rs Outdated
Comment thread src/librustc_mir/transform/qualify_min_const_fn.rs Outdated
@oli-obk
oli-obk force-pushed the organize-intrinsics-promotion-checks branch from 9d30d2f to 0bde1ad Compare November 26, 2019 09:03
Comment thread src/librustc_mir/transform/check_consts/validation.rs Outdated
@rust-highfive

This comment has been minimized.

@bors

This comment has been minimized.

Comment thread src/librustc/ty/constness.rs Outdated
Comment thread src/test/ui/consts/const-extern-fn/const-extern-fn-call-extern-fn.rs Outdated
@RalfJung

ghost commented Nov 27, 2019

Copy link
Copy Markdown
Member

The code LGTM, but please add some more comments as indicated in my comments above.

@oli-obk
oli-obk force-pushed the organize-intrinsics-promotion-checks branch from ba051bc to 0e30674 Compare November 28, 2019 14:41
Comment thread src/librustc/ty/constness.rs Outdated
@RalfJung

ghost commented Dec 3, 2019

Copy link
Copy Markdown
Member

Are these candidates for const intrinsics?

Certainly not in this PR, this just fixes our existing checks.

Do we need miri-engine implementations of them?

They are both already implemented in Miri, so this is just a matter of moving that implementation into rustc. The main issue here is that these are unsafe, and we are currently not yet willing to provide unsafe operations in const fn as there are some open design questions there.

@oli-obk
oli-obk force-pushed the organize-intrinsics-promotion-checks branch from 85f8d4c to e2bbf06 Compare December 4, 2019 00:50
@oli-obk

ghost commented Dec 4, 2019

Copy link
Copy Markdown
Contributor Author

rebased and added FIXME

@bors r=RalfJung

@bors

ghost commented Dec 4, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 5cef094 has been approved by RalfJung

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 4, 2019
@bors

ghost commented Dec 4, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5cef094 with merge 7fa0465...

@bors

ghost commented Dec 4, 2019

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: RalfJung
Pushing 7fa0465 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 4, 2019
@bors
bors merged commit 5cef094 into rust-lang:master Dec 4, 2019
@rust-highfive

ghost commented Dec 4, 2019

Copy link
Copy Markdown
Contributor

📣 Toolstate changed by #66275!

Tested on commit 7fa0465.
Direct link to PR: #66275

💔 miri on windows: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung, @rust-lang/infra).
💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung, @rust-lang/infra).

@RalfJung

ghost commented Dec 4, 2019

Copy link
Copy Markdown
Member

Ah dang, we finally got Miri in shape for the next nightly...

@oli-obk
oli-obk deleted the organize-intrinsics-promotion-checks branch March 16, 2021 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants