Skip to content

Bindings fail to parse 1u32 #356

Closed

Description

@Firestar99

Defining bindings (or potentially others) should parse 1u32 style integer literals correctly. This is important in proc macros, since quote! always adds the type to the end of an integer. Either we use LitInt from syn or IntegerLit from litrs.

error: attribute value must be integer
    --> node-graph/graster-nodes/src/adjustments.rs:58:31
     |
  58 |         #[spirv(descriptor_set = 0, binding = 1u32)] image_input: Image2d,
     |                                     ^^^^^^^^^^^^^^

System Info

  • rust-gpu master

Activity

  1. self-assigned this
    on Aug 3, 2025
  2. changed the title [-](my bug report)[/-] [+]Bindings fail to parse `1u32`[/+] on Aug 3, 2025
  3. LegNeato commented on Aug 3, 2025

    @LegNeato
    Collaborator

    BTW, there is new attribute parsing infra in rustc that is being migrated to...perhaps this should be pushed down into the compiler rather than as a normal proc macro?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions