Skip to content

r# identifiers not working as column names #360

@Nekidev

Description

@Nekidev

I was trying to name one of my table's columns type, but r#type causes the macro to panic.

proc-macro panicked: `"r#type"` is not a valid identifier

A minimal reproduction of the error can be created with

#[model]
#[table = "table_name"]
#[derive(Debug)]
pub struct MyTable {
    #[pk]
    id: String,

    r#type: MyTableType  // Enum defined with #[derive(FieldType)]
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions