ihciah / rust2go

Call Golang from Rust
https://en.ihcblog.com/rust2go/
Other
48 stars 10 forks source link

Weird error when have more than two params #3

Closed cxw620 closed 2 months ago

cxw620 commented 2 months ago

When my fn have more than two params, rustc complains like this:

error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `client_hello_id_version`
  --> src/ffi.rs:52:60
   |
52 |     fn set_client_hello_id(client_hello_id_client: String, client_hello_id_version: String);
   |                                                          - ^^^^^^^^^^^^^^^^^^^^^^^ expected one of 7 possible tokens
   |                                                          |
   |                                                          help: missing `,`

I tested in offcial example and encountered with same issue. I wonder if it's a bug and come here for help.