-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking Issue for try_trait_v2, A new design for the ? desugaring (RFC#3058) #84277
Copy link
Copy link
Open
Labels
B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-try_trait_v2Tracking issue for RFC#3058Tracking issue for RFC#3058S-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-try_trait_v2Tracking issue for RFC#3058Tracking issue for RFC#3058S-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
View all comments
This is a tracking issue for the RFC "
try_trait_v2: A new design for the?desugaring" (rust-lang/rfcs#3058).The feature gate for the issue is
#![feature(try_trait_v2)].This obviates rust-lang/rfcs#1859, tracked in #42327.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
Delete the old way after a bootstrap updateRemove theTryV2alias #88223?desugaring #85133FromResidualbut notTryFromResidualbetter (Issue rustdoc removes Try from <Self as Try>::Residual in std::ops::FromResidual #85454)Infallibleare either fine that way or have been replaced by!Iterator::try_foldtry_foldfor iterators for internal iteration #62606)foldbe implemented in terms oftry_fold, so that both don't need to be overridden.)Unresolved Questions
From RFC:
Tryuse in the associated types/traits? Output+residual, continue+break, or something else entirely?From experience in nightly:
FromResidualfrom a type that's never actually produced as a residual (Fix the types in one of theFromResidualimplementations rwf2/Rocket#1645). But that would add more friction for cases not using theFoo<!>pattern, so may not be worth it.array::{try_from_fn, try_map}andIterator::try_findgeneric overTry#91286, that might look like changing the associatedtype Residual;totype Residual: Residual<Self::Output>;.Implementation history
try_trait_v2library basics #84092try_traitfromstdarch, Remove#![feature(try_trait)]from a test stdarch#1142try_trait_v2#84767