Skip to content

Proc macro panics with unwrap on a trait #101

@maurges

Description

@maurges

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" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions