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

Introduce into_raw_non_null on Rc and Arc #57934

Merged
merged 1 commit into from Jan 31, 2019

Conversation

Projects
None yet
6 participants
@dwijnand
Copy link
Member

dwijnand commented Jan 27, 2019

No description provided.

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Jan 27, 2019

r? @bluss

(rust_highfive has picked a reviewer for you, use r? to override)

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 27, 2019

@rust-highfive rust-highfive assigned alexcrichton and unassigned bluss Jan 27, 2019

Show resolved Hide resolved src/liballoc/rc.rs
Show resolved Hide resolved src/liballoc/sync.rs

changes done

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 28, 2019

Thanks for this! On Box this is called into_raw_non_null, so should the name be updated to match that?

@dwijnand

This comment has been minimized.

Copy link
Member Author

dwijnand commented Jan 28, 2019

On Box this is called into_raw_non_null, so should the name be updated to match that?

I assumed the "raw" in Box's version is because it already had an into_raw method, but I wasn't sure if it was appropriate for Arc/Rc. I also don't know if the rename is worth it, but I'm happy to make the old name conform with the new names or make the new names conform with the old name. Do you have a preference?

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 28, 2019

Nah yeah I think we'll want to prioritize consistency across pointer types, and I think that {Arc,Rc}::into_raw should exist as well!

@dwijnand dwijnand force-pushed the dwijnand:from-Arc/Rc-to-NonNull branch from e4edfa4 to f88f4dd Jan 28, 2019

@dwijnand

This comment has been minimized.

Copy link
Member Author

dwijnand commented Jan 28, 2019

and I think that {Arc,Rc}::into_raw should exist as well!

I'm blind: I'm using {Arc,Rc}::into_raw in the implementation of into_raw_non_null 🙄🙈...

All done!

@dwijnand dwijnand force-pushed the dwijnand:from-Arc/Rc-to-NonNull branch from f88f4dd to d968af9 Jan 28, 2019

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 28, 2019

As one final nit, could the tracking issue be pointed to the same one as for Box?

@dwijnand dwijnand force-pushed the dwijnand:from-Arc/Rc-to-NonNull branch from d968af9 to 5b76913 Jan 28, 2019

@dwijnand

This comment has been minimized.

Copy link
Member Author

dwijnand commented Jan 28, 2019

Sure!

@dwijnand dwijnand force-pushed the dwijnand:from-Arc/Rc-to-NonNull branch from 5b76913 to 1e57726 Jan 28, 2019

@dwijnand dwijnand changed the title Introduce into_non_null on Rc and Arc Introduce into_raw_non_null on Rc and Arc Jan 28, 2019

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 28, 2019

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 28, 2019

📌 Commit 1e57726 has been approved by alexcrichton

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 28, 2019

@bors rollup

Centril added a commit to Centril/rust that referenced this pull request Jan 30, 2019

Rollup merge of rust-lang#57934 - dwijnand:from-Arc/Rc-to-NonNull, r=…
…alexcrichton

Introduce into_raw_non_null on Rc and Arc

None

bors added a commit that referenced this pull request Jan 30, 2019

Auto merge of #57982 - Centril:rollup, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #57106 (mark str::string::String.trim.* functions as #[must_use].)
 - #57920 (use `SOURCE_DATE_EPOCH` for man page time if set)
 - #57934 (Introduce into_raw_non_null on Rc and Arc)
 - #57974 (override `VecDeque`'s `Iter::try_fold`)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Jan 30, 2019

Rollup merge of rust-lang#57934 - dwijnand:from-Arc/Rc-to-NonNull, r=…
…alexcrichton

Introduce into_raw_non_null on Rc and Arc

None

Centril added a commit to Centril/rust that referenced this pull request Jan 30, 2019

Rollup merge of rust-lang#57934 - dwijnand:from-Arc/Rc-to-NonNull, r=…
…alexcrichton

Introduce into_raw_non_null on Rc and Arc

None

bors added a commit that referenced this pull request Jan 30, 2019

Auto merge of #57995 - Centril:rollup, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #57008 (suggest `|` when `,` founds in invalid match value)
 - #57106 (Mark str::trim.* functions as #[must_use].)
 - #57920 (use `SOURCE_DATE_EPOCH` for man page time if set)
 - #57934 (Introduce into_raw_non_null on Rc and Arc)
 - #57971 (SGX target: improve panic & exit handling)
 - #57980 (Add the edition guide to the bookshelf)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Jan 30, 2019

Rollup merge of rust-lang#57934 - dwijnand:from-Arc/Rc-to-NonNull, r=…
…alexcrichton

Introduce into_raw_non_null on Rc and Arc

None

Centril added a commit to Centril/rust that referenced this pull request Jan 30, 2019

Rollup merge of rust-lang#57934 - dwijnand:from-Arc/Rc-to-NonNull, r=…
…alexcrichton

Introduce into_raw_non_null on Rc and Arc

None

bors added a commit that referenced this pull request Jan 30, 2019

Auto merge of #58014 - Centril:rollup, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #57008 (suggest `|` when `,` founds in invalid match value)
 - #57106 (Mark str::trim.* functions as #[must_use].)
 - #57920 (use `SOURCE_DATE_EPOCH` for man page time if set)
 - #57934 (Introduce into_raw_non_null on Rc and Arc)
 - #57971 (SGX target: improve panic & exit handling)
 - #57980 (Add the edition guide to the bookshelf)
 - #57984 (Improve bug message in check_ty)
 - #57987 (Fix some AArch64 typos)
 - #57999 (Add MOVBE x86 CPU feature)
 - #58000 (Fixes and cleanups)
 - #58007 (Don't panic when accessing enum variant ctor using `Self` in match)
 - #58008 (Pass correct arguments to places_conflict)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Jan 31, 2019

Rollup merge of rust-lang#57934 - dwijnand:from-Arc/Rc-to-NonNull, r=…
…alexcrichton

Introduce into_raw_non_null on Rc and Arc

None

bors added a commit that referenced this pull request Jan 31, 2019

Auto merge of #58016 - Centril:rollup, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #57008 (suggest `|` when `,` founds in invalid match value)
 - #57106 (Mark str::trim.* functions as #[must_use].)
 - #57920 (use `SOURCE_DATE_EPOCH` for man page time if set)
 - #57934 (Introduce into_raw_non_null on Rc and Arc)
 - #57971 (SGX target: improve panic & exit handling)
 - #57980 (Add the edition guide to the bookshelf)
 - #57984 (Improve bug message in check_ty)
 - #57999 (Add MOVBE x86 CPU feature)
 - #58000 (Fixes and cleanups)
 - #58005 (update docs for fix_start/end_matches)
 - #58007 (Don't panic when accessing enum variant ctor using `Self` in match)
 - #58008 (Pass correct arguments to places_conflict)

Failed merges:

r? @ghost

@bors bors merged commit 1e57726 into rust-lang:master Jan 31, 2019

@dwijnand dwijnand deleted the dwijnand:from-Arc/Rc-to-NonNull branch Jan 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment