Skip to content

Destructure binding silently fails building IDL #3838

@hrls

Description

@hrls

This instruction has no IDL representation, and during the build phase, there are no warnings or errors.

#[program]
pub mod foobar {
    use super::*;

    pub fn initialize(Context { .. }: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

I guess the derive macro should look at context argument type and not rely on the argument name, as this is also applicable for _: Context<Initialize>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglang

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions