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 const_result #131287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Oct 5, 2024

Waiting for FCP to complete in #82814

Fixes #82814

@rustbot
Copy link
Collaborator

rustbot commented Oct 5, 2024

r? @tgross35

rustbot has assigned @tgross35.
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 Oct 5, 2024
@tgross35
Copy link
Contributor

tgross35 commented Oct 5, 2024

Cc @rust-lang/wg-const-eval for somebody else to double check the use of const_precise_live_drops, otherwise lgtm.

@tgross35
Copy link
Contributor

tgross35 commented Oct 5, 2024

Thanks @lcnr

This just changes const gates on the following:

impl<T, E> Result<T, E> {
    pub const fn as_mut(&mut self) -> Result<&mut T, &mut E>;
}

impl<T, E> Result<&T, E> {
    pub const fn copied(self) -> Result<T, E>
    where T: Copy;

impl<T, E> Result<&mut T, E> {
    pub const fn copied(self) -> Result<T, E>
    where T: Copy;

impl<T, E> Result<Option<T>, E> {
    pub const fn transpose(self) -> Option<Result<T, E>>;
}

Which is everything described at #82814.

r=me after FCP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking Issue for const Result methods
4 participants