Skip to content

Make <*const T>::is_null const fn - #74940

Merged
bors merged 2 commits into
rust-lang:masterfrom
oli-obk:const_is_null
Aug 17, 2020
Merged

bors merged 2 commits into
rust-lang:masterfrom
oli-obk:const_is_null

Conversation

@oli-obk

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

Copy link
Copy Markdown
Contributor

View all comments

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.

Comment thread library/core/src/ptr/const_ptr.rs Resolved
Comment thread library/core/src/ptr/const_ptr.rs Resolved
Comment thread library/core/src/ptr/const_ptr.rs Resolved
Comment thread src/test/ui/consts/ptr_comparisons.rs Resolved
Comment thread src/test/ui/consts/ptr_comparisons.rs Resolved
Comment thread src/test/ui/consts/ptr_comparisons.rs Resolved
Comment thread src/test/ui/consts/ptr_comparisons.rs Resolved
@RalfJung

RalfJung commented Aug 10, 2020 •

Copy link
Copy Markdown
Member

r=me with the last nits fixed and after squashing

Comment thread src/test/ui/consts/ptr_is_null.rs Resolved
@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

bors commented Aug 11, 2020

Copy link
Copy Markdown
Collaborator

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

@oli-obk

oli-obk commented Aug 11, 2020

Copy link
Copy Markdown
Contributor Author

@bors r=RalfJung

@bors

bors commented Aug 11, 2020

Copy link
Copy Markdown
Collaborator

📌 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
Copy Markdown
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
Copy Markdown
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

bors commented Aug 11, 2020

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Aug 11, 2020

Copy link
Copy Markdown
Collaborator

💔 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
Copy Markdown
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

oli-obk commented Aug 17, 2020

Copy link
Copy Markdown
Contributor Author

@bors r=RalfJung

@bors

bors commented Aug 17, 2020

Copy link
Copy Markdown
Collaborator

📌 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

bors commented Aug 17, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit daf7a37 with merge e8df0b8...

@bors

bors commented Aug 17, 2020

Copy link
Copy Markdown
Collaborator

☀️ 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
@clarfonthey clarfonthey added the A-raw-pointers Area: raw pointers, MaybeUninit, NonNull label Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-raw-pointers Area: raw pointers, MaybeUninit, NonNull 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.

7 participants