Skip to content
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 <*const T>::is_null const fn #74940

Merged
merged 2 commits into from
Aug 17, 2020
Merged

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jul 30, 2020

r? @RalfJung

cc @rust-lang/wg-const-eval

tracking issue: #74939

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 30, 2020
@mati865

This comment has been minimized.

src/librustc_mir/interpret/intrinsics.rs Outdated Show resolved Hide resolved
library/core/src/ptr/const_ptr.rs Show resolved Hide resolved
src/librustc_mir/interpret/intrinsics.rs Outdated Show resolved Hide resolved
@RalfJung
Copy link
Member

RalfJung commented Aug 10, 2020

r=me with the last nits fixed and after squashing

@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 Aug 10, 2020
@bors
Copy link
Contributor

bors commented Aug 11, 2020

☔ The latest upstream changes (presumably #75383) made this pull request unmergeable. Please resolve the merge conflicts.

@oli-obk
Copy link
Contributor Author

oli-obk commented Aug 11, 2020

@bors r=RalfJung

@bors
Copy link
Contributor

bors commented Aug 11, 2020

📌 Commit 34c3c0d 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 Aug 11, 2020
@@ -0,0 +1,16 @@
// compile-flags: --crate-type=lib
// check-pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure check-pass is enough for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

considering that it did cause stderr output when I had the asserts inverted, yes.

These constants are evaluated by the lint that used to be const_err, and check runs all lints.

@bors
Copy link
Contributor

bors commented Aug 11, 2020

⌛ Testing commit 34c3c0d with merge 6495955293bc979b4b521db8cb744f36bba1fd6f...

@bors
Copy link
Contributor

bors commented Aug 11, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 11, 2020
@RalfJung
Copy link
Member

@oli-obk
this needs tests to be made compatible with 32bit.

-	   |                  inbounds test failed: pointer must be in-bounds at offset 16, but is outside bounds of alloc2 which has size 8
+	   |                  inbounds test failed: pointer must be in-bounds at offset 8, but is outside bounds of alloc2 which has size 4

@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 Aug 17, 2020
@oli-obk
Copy link
Contributor Author

oli-obk commented Aug 17, 2020

@bors r=RalfJung

@bors
Copy link
Contributor

bors commented Aug 17, 2020

📌 Commit daf7a37 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 Aug 17, 2020
@bors
Copy link
Contributor

bors commented Aug 17, 2020

⌛ Testing commit daf7a37 with merge e8df0b8...

@bors
Copy link
Contributor

bors commented Aug 17, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: RalfJung
Pushing e8df0b8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 17, 2020
@bors bors merged commit e8df0b8 into rust-lang:master Aug 17, 2020
@oli-obk oli-obk deleted the const_is_null branch March 16, 2021 12:14
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
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.

6 participants