Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proc macro panics with unwrap on a trait #101

Open
maurges opened this issue Feb 17, 2025 · 0 comments
Open

Proc macro panics with unwrap on a trait #101

maurges opened this issue Feb 17, 2025 · 0 comments

Comments

@maurges
Copy link

maurges commented Feb 17, 2025

Here's the full code:

#[stabby::stabby]
pub trait IsInteger {
    extern "C" fn add(&self, rhs: &Self) -> Self;
}

Here's the error message:

error: custom attribute panicked
 --> src/lib.rs:1:1
  |
1 | #[stabby::stabby]
  | ^^^^^^^^^^^^^^^^^
  |
  = help: message: called `Option::unwrap()` on a `None` value

I can't find anything in the docs about such a type for a method being forbidden (even though it makes sense to be). The error message is poor in this case

Stabby version is stabby = { version = "36" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant