JohnTitor / ctest2

Automatic testing of FFI bindings for Rust
https://crates.io/crates/ctest2
Apache License 2.0
22 stars 20 forks source link

CTest uses syntex_syntax which doesn't support raw identifiers. #6

Open ghost opened 4 years ago

ghost commented 4 years ago

CTest fails on code that uses raw identifiers like r#type. Currently libc translation of structs that have a type field in c are translated as type_ because of that.

If CTest would support raw identifiers we could accurately use type as a field name in rust too.

JohnTitor commented 4 years ago

I'd say it would be quite hard as syntex is quite old. So we should:

  1. Find the possible oldest version that supports the raw identifiers.
  2. Update syntex (note that we now use https://github.com/JohnTitor/garando instead to remove some outdated dependencies)
  3. Make sure that all the things aren't broken.
JohnTitor commented 2 years ago

Maybe we could use syn crate alternatively but it'd be a big change.