-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-decl-macros-1-2Area: Declarative macros 1.2Area: Declarative macros 1.2A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Given the following struct:
#[derive(AsChangeset)]
#[table_name = "users"]
struct UserForm {
id: i32,
name: String,
}
the input to the custom derive will have incorrect span information for every token in the table_name
attribute except for the pound. Every other token will have the span Span { lo: BytePos(0), hi: BytePos(0), ctxt: #0 }
.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-decl-macros-1-2Area: Declarative macros 1.2Area: Declarative macros 1.2A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.