Skip to content

Add Vec::leak #62196

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 3, 2019
Merged

Add Vec::leak #62196

merged 1 commit into from
Jul 3, 2019

Conversation

cramertj
Copy link
Member

No description provided.

@rust-highfive
Copy link
Contributor

r? @withoutboats

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 27, 2019
@jonas-schievink jonas-schievink added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jun 27, 2019
@withoutboats
Copy link
Contributor

@bors r+

Seems reasonable at least on nightly, its annoying to write by hand.

@bors
Copy link
Collaborator

bors commented Jun 27, 2019

📌 Commit 206a384ef058c61f4f9818849fe7a2ed1ef43ff5 has been approved by withoutboats

@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 Jun 27, 2019
@matklad
Copy link
Member

matklad commented Jun 28, 2019

Am I missing something, or is this just Box::leak(vec.into_boxed_slice())?

@Centril
Copy link
Contributor

Centril commented Jun 28, 2019

@bors r-

This can be written without the unsafe as per @matklad's comment (even Box::leak(vec.into()) will suffice) and so we should do that in the implementation to reduce the overall trusted computing base.

@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 Jun 28, 2019
@cramertj
Copy link
Member Author

This can be written without the unsafe

Done, thanks for the suggestion.

@Centril
Copy link
Contributor

Centril commented Jun 28, 2019

Thanks!

@bors r=withoutboats,Centril rollup

@bors
Copy link
Collaborator

bors commented Jun 28, 2019

📌 Commit 86d96e33550f8027f80a4ba299c1e97cbd6e0505 has been approved by withoutboats,Centril

@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 Jun 28, 2019
@cramertj
Copy link
Member Author

@bors r=withoutboats,Centril rollup

@bors
Copy link
Collaborator

bors commented Jun 28, 2019

📌 Commit bd10be5 has been approved by withoutboats,Centril

Centril added a commit to Centril/rust that referenced this pull request Jun 28, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 28, 2019
@Centril

This comment has been minimized.

@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 Jun 28, 2019
@cramertj
Copy link
Member Author

cramertj commented Jul 1, 2019

@bors r=centril,withoutboats

@bors
Copy link
Collaborator

bors commented Jul 1, 2019

📌 Commit 9527565 has been approved by cramertj

@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 Jul 1, 2019
@bors
Copy link
Collaborator

bors commented Jul 1, 2019

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Jul 1, 2019

📌 Commit 9527565 has been approved by centril,withoutboats

Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 2, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jul 3, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jul 3, 2019
bors added a commit that referenced this pull request Jul 3, 2019
Rollup of 15 pull requests

Successful merges:

 - #62021 (MSVC link output improve)
 - #62064 (nth_back for chunks_exact)
 - #62128 (Adjust warning of -C extra-filename with -o.)
 - #62161 (Add missing links for TryFrom docs)
 - #62183 (std: Move a process test out of libstd)
 - #62186 (Add missing type urls in Into trait)
 - #62196 (Add Vec::leak)
 - #62199 (import gdb for explicit access to gdb.current_objfile())
 - #62229 (Enable intptrcast for explicit casts)
 - #62250 (Improve box clone doctests to ensure the documentation is valid)
 - #62255 (Switch tracking issue for `#![feature(slice_patterns)]`)
 - #62285 (Fix michaelwoerister's mailmap)
 - #62304 (HashMap is UnwindSafe)
 - #62319 (Fix mismatching Kleene operators)
 - #62327 (Fixed document bug, those replaced each other)

Failed merges:

r? @ghost
@bors bors merged commit 9527565 into rust-lang:master Jul 3, 2019
@cramertj cramertj deleted the vec-leak branch July 3, 2019 18:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants