yutannihilation / savvy

A simple R extension interface using Rust
https://yutannihilation.github.io/savvy/guide/
MIT License
63 stars 3 forks source link

Reject lifetimed struct #283

Closed yutannihilation closed 1 month ago

yutannihilation commented 1 month ago

Show better error message for https://github.com/yutannihilation/savvy/issues/281

error: #[savvy] macro doesn't support lifetime
  --> tests/cases/simple_cases.rs:54:12
   |
54 | struct Foo<'a>(External::Bar<'a>);
   |            ^^
yutannihilation commented 1 month ago

Note: I'm not sure how type parameters should be treated. It might be allowed, but then it should complicate the code a bit (e.g., can I use Foo<T> for a class name for R?). I'm wondering if it's worth, considering the main scope of savvy is to support simple cases.