diff options
| author | bors <bors@rust-lang.org> | 2020-03-28 11:13:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-28 11:13:09 +0000 |
| commit | b9d5ee567652cd342d9348c215009049551747b0 (patch) | |
| tree | 820b045d697c1263c497f442274d1a9aac952189 /src/librustc_expand | |
| parent | b76238a3ee5ebffbad8a3aefd36012f3bceb7069 (diff) | |
| parent | 42c5cfdfda24529f424a6175fa1a48e5542cb824 (diff) | |
| download | rust-b9d5ee567652cd342d9348c215009049551747b0.tar.gz rust-b9d5ee567652cd342d9348c215009049551747b0.zip | |
Auto merge of #70261 - Centril:angle-args-partition, r=varkor
Move arg/constraint partition check to validation & improve recovery - In the first commit, we move the check rejecting e.g., `<'a, Item = u8, String>` from the parser into AST validation. - We then use this to improve the code for parsing generic arguments. - And we add recovery for e.g., `<Item = >` (missing), `<Item = 42>` (constant), and `<Item = 'a>` (lifetime). This is also preparatory work for supporting https://github.com/rust-lang/rust/issues/70256. r? @varkor
Diffstat (limited to 'src/librustc_expand')
| -rw-r--r-- | src/librustc_expand/build.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_expand/build.rs b/src/librustc_expand/build.rs index 48ceaf5fccd..4d89bf79e7c 100644 --- a/src/librustc_expand/build.rs +++ b/src/librustc_expand/build.rs @@ -36,7 +36,8 @@ impl<'a> ExtCtxt<'a> { idents.into_iter().map(|ident| ast::PathSegment::from_ident(ident.with_span_pos(span))), ); let args = if !args.is_empty() { - ast::AngleBracketedArgs { args, constraints: Vec::new(), span }.into() + let args = args.into_iter().map(ast::AngleBracketedArg::Arg).collect(); + ast::AngleBracketedArgs { args, span }.into() } else { None }; |
