Skip to content

no rules expected the token '...' when using varargs: #24

@ids1024

Description

@ids1024
error: no rules expected the token `...`
   --> src/lib.rs:18:30
    |
13  |         fn blah(c_int, c_int ...) -> *const c_void,
    |                              ^^^ no rules expected this token in macro call
    |
note: while trying to match `)`
   --> /home/ian/src/dlib/src/lib.rs:378:73
    |
378 |         $(varargs: $($(#[$vattr:meta])* fn $vname: ident($($vargs: ty),+) -> $vret: ty),+,)|*

I noticed this testing #22, after updating the doc tests to otherwise pass, and removing the use of statics: so it wouldn't first fail due to #24.

Adding .. to the macro patters complains '$vargs:ty' may be followed by '...', which is not allowed for 'ty' fragments. So it seems this just isn't a valid syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions