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

Rename Unique::empty() -> Unique::dangling() #71597

Merged
merged 1 commit into from
Apr 30, 2020

Conversation

CohenArthur
Copy link
Contributor

A FIXME comment in src/libcore/ptr/unique.rs suggested refactoring Unique::empty() to Unique::dangling() which this PR does.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @shepmaster (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 26, 2020
@shepmaster
Copy link
Member

/cc @RalfJung

@shepmaster
Copy link
Member

shepmaster commented Apr 27, 2020

A FIXME comment

Shouldn't this comment be removed in this PR, if it's being fixed?

nevermind, I just can't read (Mondays...)

@shepmaster
Copy link
Member

refactoring Unique::empty() to Unique::dangling()

Ah, I wouldn't have called this refactoring (although I think it technically is), but "renaming" is more precise terminology. We aren't changing the code to call some existing dangling method, which is what I thought this would be based on the name "refactoring".

@CohenArthur
Copy link
Contributor Author

A FIXME comment

Shouldn't this comment be removed in this PR, if it's being fixed?

nevermind, I just can't read (Mondays...)

Haha no worries

refactoring Unique::empty() to Unique::dangling()

Ah, I wouldn't have called this refactoring (although I think it technically is), but "renaming" is more precise terminology. We aren't changing the code to call some existing dangling method, which is what I thought this would be based on the name "refactoring".

Good point. It is indeed a very basic refactoring. I can change the history if you'd like

@RalfJung RalfJung changed the title Refactor Unique::empty() -> Unique::dangling() Rename Unique::empty() -> Unique::dangling() Apr 27, 2020
@RalfJung
Copy link
Member

"dangling" is what we call this elsewhere, so renaming makes sense to me.

@shepmaster
Copy link
Member

Otherwise, these changes look good, please go ahead and squash them and make the "renaming" change to the commit messages and we can merge!

@shepmaster
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 29, 2020

📌 Commit 91d0f8b4f44c373ec0efe069cd45d2c3fa3572ee has been approved by shepmaster

@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 Apr 29, 2020
This was referenced Apr 29, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 29, 2020
Rollup of 6 pull requests

Successful merges:

 - rust-lang#71507 (Document unsafety in core::ptr)
 - rust-lang#71572 (test iterator chain type length blowup)
 - rust-lang#71617 (Suggest `into` instead of `try_into` if possible with int types)
 - rust-lang#71627 (Fix wrong argument in autoderef process)
 - rust-lang#71678 (Add an index page for nightly rustc docs.)
 - rust-lang#71680 (Fix doc link to Eq trait from PartialEq trait)

Failed merges:

 - rust-lang#71597 (Rename Unique::empty() -> Unique::dangling())

r? @ghost
@bors
Copy link
Contributor

bors commented Apr 30, 2020

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

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 30, 2020
rename-unique: Change calls and doc in raw_vec.rs

rename-unique: Change empty() -> dangling() in const-ptr-unique-rpass.rs
@Dylan-DPC-zz
Copy link

@bors r=shepmaster

@bors
Copy link
Contributor

bors commented Apr 30, 2020

📌 Commit eda7f8f has been approved by shepmaster

@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 Apr 30, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 30, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#70950 (extend NLL checker to understand `'empty` combined with universes)
 - rust-lang#71433 (Add help message for missing right operand in condition)
 - rust-lang#71449 (Move `{Free,}RegionRelations` and `FreeRegionMap` to `rustc_infer`)
 - rust-lang#71559 (Detect git version before attempting to use --progress)
 - rust-lang#71597 (Rename Unique::empty() -> Unique::dangling())

Failed merges:

r? @ghost
@bors bors merged commit 97a8870 into rust-lang:master Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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