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

Remove `T: Sized` on `ptr::is_null()` #46094

Merged
merged 1 commit into from Nov 28, 2017

Conversation

Projects
None yet
8 participants
@dtolnay
Member

dtolnay commented Nov 19, 2017

Originally from #44932 -- this is purely a revert of the last commit of that PR, which was removing some changes from the previous commits in the PR. So a revert of a revert means this is code written by @cuviper!

@mikeyhew makes a compelling case in rust-lang/rfcs#433 (comment) for why this is the right way to implement is_null for trait objects. And the behavior for slices makes sense to me as well.

  impl<T: ?Sized> *const T {
-     pub fn is_null(self) -> bool where T: Sized;
+     pub fn is_null(self) -> bool;
  }

  impl<T: ?Sized> *mut T {
-     pub fn is_null(self) -> bool where T: Sized;
+     pub fn is_null(self) -> bool;
  }
Remove `T: Sized` on `ptr::is_null()`
This reverts commit 604f049.

This is purely a revert of cuviper's revert "Restore `T: Sized` on
`ptr::is_null`". So double revert means this is code written by cuviper!
@dtolnay

This comment has been minimized.

Show comment
Hide comment
@dtolnay

dtolnay Nov 21, 2017

Member

@rfcbot fcp merge

Member

dtolnay commented Nov 21, 2017

@rfcbot fcp merge

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Nov 21, 2017

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

rfcbot commented Nov 21, 2017

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@carols10cents

This comment has been minimized.

Show comment
Hide comment
@carols10cents

carols10cents Nov 27, 2017

Member

Ping @BurntSushi, waiting on your ticky box here!

Member

carols10cents commented Nov 27, 2017

Ping @BurntSushi, waiting on your ticky box here!

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Nov 28, 2017

🔔 This is now entering its final comment period, as per the review above. 🔔

rfcbot commented Nov 28, 2017

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Nov 28, 2017

🔔 This is now entering its final comment period, as per the review above. 🔔

rfcbot commented Nov 28, 2017

🔔 This is now entering its final comment period, as per the review above. 🔔

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton
Member

alexcrichton commented Nov 28, 2017

@bors: r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Nov 28, 2017

Contributor

📌 Commit e0f58c6 has been approved by alexcrichton

Contributor

bors commented Nov 28, 2017

📌 Commit e0f58c6 has been approved by alexcrichton

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Nov 28, 2017

Contributor

⌛️ Testing commit e0f58c6 with merge 73bca2b...

Contributor

bors commented Nov 28, 2017

⌛️ Testing commit e0f58c6 with merge 73bca2b...

bors added a commit that referenced this pull request Nov 28, 2017

Auto merge of #46094 - dtolnay:is_null, r=alexcrichton
Remove `T: Sized` on `ptr::is_null()`

Originally from #44932 -- this is purely a revert of the last commit of that PR, which was removing some changes from the previous commits in the PR. So a revert of a revert means this is code written by @cuviper!

@mikeyhew makes a compelling case in rust-lang/rfcs#433 (comment) for why this is the right way to implement `is_null` for trait objects. And the behavior for slices makes sense to me as well.

```diff
  impl<T: ?Sized> *const T {
-     pub fn is_null(self) -> bool where T: Sized;
+     pub fn is_null(self) -> bool;
  }

  impl<T: ?Sized> *mut T {
-     pub fn is_null(self) -> bool where T: Sized;
+     pub fn is_null(self) -> bool;
  }
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Nov 28, 2017

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 73bca2b to master...

Contributor

bors commented Nov 28, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 73bca2b to master...

@bors bors merged commit e0f58c6 into rust-lang:master Nov 28, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@dtolnay dtolnay deleted the dtolnay:is_null branch Dec 13, 2017

sgrif added a commit to diesel-rs/diesel that referenced this pull request May 22, 2018

Our minimum supported Rust version is 1.24.
This was already true, as we require
rust-lang/rust#46094 to compile. This commit
ensures that we test for this on CI so we know if this changes in the
future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment