Support parenthesized paths Foo(A,B) -> C
that expand to Foo<(A,B),C>
. These paths also bind anonymous regions (or will, once HRTB is fully working).
Fixes #18423.
This commit is contained in:
parent
4e352892c8
commit
221edbae38
38 changed files with 841 additions and 264 deletions
|
@ -313,14 +313,15 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
|
|||
.map(|ident| {
|
||||
ast::PathSegment {
|
||||
identifier: ident,
|
||||
lifetimes: Vec::new(),
|
||||
types: OwnedSlice::empty(),
|
||||
parameters: ast::PathParameters::none(),
|
||||
}
|
||||
}).collect();
|
||||
segments.push(ast::PathSegment {
|
||||
identifier: last_identifier,
|
||||
lifetimes: lifetimes,
|
||||
types: OwnedSlice::from_vec(types),
|
||||
parameters: ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
|
||||
lifetimes: lifetimes,
|
||||
types: OwnedSlice::from_vec(types),
|
||||
})
|
||||
});
|
||||
ast::Path {
|
||||
span: sp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue