diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-08-11 08:25:30 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-08-12 15:28:10 +0300 |
| commit | 34dcca20e5909513f08d1c21df1168357c3b6b6a (patch) | |
| tree | f78f1631dc01f087100caca6bf692152d0e4259b /src/libsyntax/parse | |
| parent | 72f8043d44a8925e469daf5c10e2630c80c2a7d4 (diff) | |
| download | rust-34dcca20e5909513f08d1c21df1168357c3b6b6a.tar.gz rust-34dcca20e5909513f08d1c21df1168357c3b6b6a.zip | |
syntax: account for CVarArgs being in the argument list.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1c1428c5713..2286e74e633 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1236,7 +1236,7 @@ impl<'a> Parser<'a> { let args: Vec<_> = args.into_iter().filter_map(|x| x).collect(); - if c_variadic && args.is_empty() { + if c_variadic && args.len() <= 1 { self.span_err(sp, "C-variadic function must be declared with at least one named argument"); } |
