-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
A-macrosMacro related proposals and issuesMacro related proposals and issuesA-patternsPattern matching related proposals & ideasPattern matching related proposals & ideasT-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.
Description
Similarly to #1336, since function parameters can be destructured with patterns:
fn foo((x, y): (u32, u32)) -> u32 {
…
}pat fragment specifiers should be able to be followed by :. The motivation case for this is something like:
macro_rules! terse {
($name:ident($($arg:pat : $type:ty),*) $body:block => {
fn $name<T>($($arg : $type),*) -> T
where really::long::and::tedious::Bound<That=Even, Has=Associated> + Types
$body
}
}
terse!{bar((x, y): (u32, u32)) {
…
}}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-macrosMacro related proposals and issuesMacro related proposals and issuesA-patternsPattern matching related proposals & ideasPattern matching related proposals & ideasT-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.
Type
Fields
Give feedbackNo fields configured for issues without a type.