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

Stabilize Option::as_deref and Option::as_deref_mut #64708

Merged
merged 1 commit into from
Oct 6, 2019

Conversation

SimonSapin
Copy link
Contributor

The tracking issue #50264 still has unresolved question for the corresponding Result methods.

@SimonSapin SimonSapin added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. B-unstable Blocker: Implemented in the nightly compiler and unstable. labels Sep 23, 2019
@rust-highfive
Copy link
Collaborator

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 Sep 23, 2019
@SimonSapin
Copy link
Contributor Author

There seems to be consensus for this in the tracking issue #50264, but not yet for the Result methods.

@rfcbot fcp merge

@Centril Centril changed the title Stabilize Option::deref and Option::deref_mut Stabilize Option::as_deref and Option::as_deref_mut Sep 23, 2019
@Centril Centril added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 23, 2019
@Centril Centril added this to the 1.40 milestone Sep 23, 2019
@Centril
Copy link
Contributor

Centril commented Sep 23, 2019

r? @Centril

r=me rollup when FCP completes. There are also some #![feature(inner_deref)] throughout the compiler which can now be removed.

@rfcbot
Copy link

rfcbot commented Sep 23, 2019

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

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), 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 rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Sep 23, 2019
@alexcrichton
Copy link
Member

On a mild stylistic note, would it be possible to move these two methods into the main impl Option<T> block with where clauses?

@Centril
Copy link
Contributor

Centril commented Sep 23, 2019

(If you want to do that where clause change here, also r=me when... ^^)

@Centril Centril added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 23, 2019
@SimonSapin
Copy link
Contributor Author

@alexcrichton I considered that, but the rest of the file has impl<T: Default> Option<T> {…}, impl<T: Clone> Option<&mut T> {…}, impl<T: fmt::Debug> Option<T> {…}, etc. Changing the style for the whole file may be worth a separate PR.

The tracking issue rust-lang#50264
still has unresolved question for the corresponding `Result` methods.
@SimonSapin
Copy link
Contributor Author

There are also some #![feature(inner_deref)] throughout the compiler which can now be removed.

Done.

@rfcbot
Copy link

rfcbot commented Sep 24, 2019

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

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Sep 24, 2019
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Oct 4, 2019
@rfcbot
Copy link

rfcbot commented Oct 4, 2019

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@Centril
Copy link
Contributor

Centril commented Oct 4, 2019

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 4, 2019

📌 Commit 0797712 has been approved by 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-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Oct 4, 2019
Centril added a commit to Centril/rust that referenced this pull request Oct 4, 2019
Stabilize `Option::as_deref` and `Option::as_deref_mut`

The tracking issue rust-lang#50264 still has unresolved question for the corresponding `Result` methods.
bors added a commit that referenced this pull request Oct 5, 2019
Rollup of 8 pull requests

Successful merges:

 - #64708 (Stabilize `Option::as_deref` and `Option::as_deref_mut`)
 - #64909 (When encountering chained operators use heuristics to recover from bad turbofish)
 - #65011 (Do not ICE when dereferencing non-Copy raw pointer)
 - #65064 (permit asyncawait-ondeck to be added by anyone)
 - #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR)
 - #65100 (Replace GeneratorSubsts with SubstsRef)
 - #65105 (Split out some passes from librustc)
 - #65106 (Allow unused attributes to avoid incremental bug)

Failed merges:

r? @ghost
tmandry added a commit to tmandry/rust that referenced this pull request Oct 5, 2019
Stabilize `Option::as_deref` and `Option::as_deref_mut`

The tracking issue rust-lang#50264 still has unresolved question for the corresponding `Result` methods.
tmandry added a commit to tmandry/rust that referenced this pull request Oct 6, 2019
Stabilize `Option::as_deref` and `Option::as_deref_mut`

The tracking issue rust-lang#50264 still has unresolved question for the corresponding `Result` methods.
bors added a commit that referenced this pull request Oct 6, 2019
Rollup of 18 pull requests

This contains changes from all the successful runs that bors marked as timed out, plus a revert of #63649 which appears to be the immediate cause of the timeouts.

Successful merges:

 - #64708 (Stabilize `Option::as_deref` and `Option::as_deref_mut`)
 - #64728 (Stabilize UdpSocket::peer_addr)
 - #64765 (std: Reduce checks for `feature = "backtrace"`)
 - #64909 (When encountering chained operators use heuristics to recover from bad turbofish)
 - #65011 (Do not ICE when dereferencing non-Copy raw pointer)
 - #65064 (permit asyncawait-ondeck to be added by anyone)
 - #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR)
 - #65100 (Replace GeneratorSubsts with SubstsRef)
 - #65105 (Split out some passes from librustc)
 - #65106 (Allow unused attributes to avoid incremental bug)
 - #65113 (Fix lonely backtick)
 - #65116 (Remove unneeded visit_statement definition)
 - #65118 (Update the documented default of -Z mutable-noalias)
 - #65123 (Account for macro invocation in `let mut $pat` diagnostic.)
 - #65124 (Replace some instances of `as *[const | mut] _` with `.cast()`)
 - #65126 (Fix typo on `now()` comments)
 - #65130 (lint: extern non-exhaustive types are improper)
 - #65151 (Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend")

Failed merges:

r? @ghost
@bors bors merged commit 0797712 into rust-lang:master Oct 6, 2019
@SimonSapin SimonSapin deleted the option-deref branch October 30, 2019 09:54
zmrow added a commit to zmrow/tough that referenced this pull request Apr 17, 2020
This is a decent set of changes to tuftool. It fully removes the
KeySource enum in source.rs and instead uses the KeySource trait
from tough.

This commit also removes all SSM related code in favor of the
tough-ssm crate (which is a copy of this code).

It also removes the deref.rs file, as it is no longer need because
these features have stabilized in upstream Rust. See:
rust-lang/rust#50264
and
rust-lang/rust#64708
zmrow added a commit to zmrow/tough that referenced this pull request Apr 17, 2020
This is a decent set of changes to tuftool. It fully removes the
KeySource enum in source.rs and instead uses the KeySource trait
from tough.

This commit also removes all SSM related code in favor of the
tough-ssm crate (which is a copy of this code).

It also removes the deref.rs file, as it is no longer need because
these features have stabilized in upstream Rust. See:
rust-lang/rust#50264
and
rust-lang/rust#64708
zmrow added a commit to zmrow/tough that referenced this pull request Apr 27, 2020
This is a decent set of changes to tuftool. It fully removes the
KeySource enum in source.rs and instead uses the KeySource trait
from tough.

This commit also removes all SSM related code in favor of the
tough-ssm crate (which is a copy of this code).

It also removes the deref.rs file, as it is no longer need because
these features have stabilized in upstream Rust. See:
rust-lang/rust#50264
and
rust-lang/rust#64708
zmrow added a commit to zmrow/tough that referenced this pull request Apr 30, 2020
This is a decent set of changes to tuftool. It fully removes the
KeySource enum in source.rs and instead uses the KeySource trait
from tough.

This commit also removes all SSM related code in favor of the
tough-ssm crate (which is a copy of this code).

It also removes the deref.rs file, as it is no longer need because
these features have stabilized in upstream Rust. See:
rust-lang/rust#50264
and
rust-lang/rust#64708
zmrow added a commit to zmrow/tough that referenced this pull request Apr 30, 2020
This is a decent set of changes to tuftool. It fully removes the
KeySource enum in source.rs and instead uses the KeySource trait
from tough.

This commit also removes all SSM related code in favor of the
tough-ssm crate (which is a copy of this code).

It also removes the deref.rs file, as it is no longer need because
these features have stabilized in upstream Rust. See:
rust-lang/rust#50264
and
rust-lang/rust#64708
zmrow added a commit to zmrow/tough that referenced this pull request Apr 30, 2020
This is a decent set of changes to tuftool. It fully removes the
KeySource enum in source.rs and instead uses the KeySource trait
from tough.

This commit also removes all SSM related code in favor of the
tough-ssm crate (which is a copy of this code).

It also removes the deref.rs file, as it is no longer need because
these features have stabilized in upstream Rust. See:
rust-lang/rust#50264
and
rust-lang/rust#64708
zmrow added a commit to zmrow/tough that referenced this pull request May 19, 2020
This is a decent set of changes to tuftool. It fully removes the
KeySource enum in source.rs and instead uses the KeySource trait
from tough.

This commit also removes all SSM related code in favor of the
tough-ssm crate (which is a copy of this code).

It also removes the deref.rs file, as it is no longer need because
these features have stabilized in upstream Rust. See:
rust-lang/rust#50264
and
rust-lang/rust#64708
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-unstable Blocker: Implemented in the nightly compiler and unstable. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. relnotes Marks issues that should be documented in the release notes of the next release. 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.

7 participants