diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2014-11-03 21:52:52 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2014-11-06 06:48:23 -0500 |
| commit | 221edbae3843848047825701e25b6f9d8b096075 (patch) | |
| tree | db2ef27822cf4598c34ff28e3b1bd4ec27cbb910 /src/libsyntax/ext/build.rs | |
| parent | 4e352892c8ca76f49332fb74d9903677dea2c5fe (diff) | |
| download | rust-221edbae3843848047825701e25b6f9d8b096075.tar.gz rust-221edbae3843848047825701e25b6f9d8b096075.zip | |
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.
Diffstat (limited to 'src/libsyntax/ext/build.rs')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index dc4eaf7d7ad..5921d630b89 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -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, |
