Skip to content

[Help] proc macros hiding error information #126

@ToxicMushroom

Description

@ToxicMushroom

Do you know of an approach to debug errors such as these ?

error[E0502]: cannot borrow value as mutable because it is also borrowed as immutable
   --> src/tui/mod.rs:275:1
    |
275 | #[component]
    | ^^^^^^^^^^^^
    | |
    | mutable borrow occurs here
    | immutable borrow occurs here
    | immutable borrow later used here
    | in this attribute macro expansion
    |
   ::: /home/merlijn/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/iocraft-macros-0.2.3/src/lib.rs:648:1
    |
648 | pub fn component(_attr: TokenStream, item: TokenStream) -> TokenStream {
    | ---------------------------------------------------------------------- in this expansion of `#[component]`

I've had other cases like this with lifetimes and references but was able to solve those in the end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionQuestions about the library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions