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

Add NonNull convenience methods to Box and Vec #130061

Merged
merged 4 commits into from
Sep 15, 2024

Conversation

theemathas
Copy link
Contributor

@theemathas theemathas commented Sep 7, 2024

Implements the ACP: rust-lang/libs-team#418.

The docs for the added methods are mostly copied from the existing methods that use raw pointers instead of NonNull.

I'm new to this "contributing to rustc" thing, so I'm sorry if I did something wrong. In particular, I don't know what the process is for creating a new unstable feature. Please advise me if I should do something. Thank you.

@rustbot
Copy link
Collaborator

rustbot commented Sep 7, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 7, 2024
@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum
Copy link
Member

This looks good to me. Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Sep 14, 2024

📌 Commit 79b87c5 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Sep 14, 2024
@workingjubilee
Copy link
Member

Needs a tracking issue and to reference that issue in its stability annotations.

@bors r-

@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 Sep 14, 2024
library/alloc/src/boxed.rs Outdated Show resolved Hide resolved
library/alloc/src/boxed.rs Outdated Show resolved Hide resolved
library/alloc/src/vec/mod.rs Outdated Show resolved Hide resolved
@workingjubilee
Copy link
Member

I'm new to this "contributing to rustc" thing, so I'm sorry if I did something wrong. In particular, I don't know what the process is for creating a new unstable feature.

Before merging this API, it should have a tracking issue, that's all. It literally doesn't matter how nice you make the tracking issue (though the library tracking issue template is a good start...), what matters is that when this lands, there is an issue number to point back to. Then it can be cleaned up if necessary.

@theemathas
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 14, 2024
@workingjubilee
Copy link
Member

cool, thanks.

@bors r=MarkSimulacrum,workingjubilee

@bors
Copy link
Contributor

bors commented Sep 14, 2024

📌 Commit 811ee38 has been approved by MarkSimulacrum,workingjubilee

It is now in the queue for this repository.

@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 Sep 14, 2024
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 15, 2024
…kSimulacrum,workingjubilee

Add `NonNull` convenience methods to `Box` and `Vec`

Implements the ACP: rust-lang/libs-team#418.

The docs for the added methods are mostly copied from the existing methods that use raw pointers instead of `NonNull`.

I'm new to this "contributing to rustc" thing, so I'm sorry if I did something wrong. In particular, I don't know what the process is for creating a new unstable feature. Please advise me if I should do something. Thank you.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 15, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#130042 (properly handle EOF in BufReader::peek)
 - rust-lang#130061 (Add `NonNull` convenience methods to `Box` and `Vec`)
 - rust-lang#130202 (set `download-ci-llvm = true` by default on "library" and "tools" profiles)
 - rust-lang#130214 (MaybeUninit::zeroed: mention that padding is not zeroed)
 - rust-lang#130353 (Make some lint doctests compatible with `--stage=0`)
 - rust-lang#130370 (unstable-book: `trait_upcasting` example should not have `#![allow(incomplete_features)]`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 15, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#130042 (properly handle EOF in BufReader::peek)
 - rust-lang#130061 (Add `NonNull` convenience methods to `Box` and `Vec`)
 - rust-lang#130202 (set `download-ci-llvm = true` by default on "library" and "tools" profiles)
 - rust-lang#130214 (MaybeUninit::zeroed: mention that padding is not zeroed)
 - rust-lang#130353 (Make some lint doctests compatible with `--stage=0`)
 - rust-lang#130370 (unstable-book: `trait_upcasting` example should not have `#![allow(incomplete_features)]`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c11505f into rust-lang:master Sep 15, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 15, 2024
Rollup merge of rust-lang#130061 - theemathas:box_vec_non_null, r=MarkSimulacrum,workingjubilee

Add `NonNull` convenience methods to `Box` and `Vec`

Implements the ACP: rust-lang/libs-team#418.

The docs for the added methods are mostly copied from the existing methods that use raw pointers instead of `NonNull`.

I'm new to this "contributing to rustc" thing, so I'm sorry if I did something wrong. In particular, I don't know what the process is for creating a new unstable feature. Please advise me if I should do something. Thank you.
@bors
Copy link
Contributor

bors commented Sep 15, 2024

⌛ Testing commit 811ee38 with merge bc486f3...

@theemathas theemathas deleted the box_vec_non_null branch September 15, 2024 07:39
@workingjubilee
Copy link
Member

chill, bors.
@bors r-

@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 Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants