-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Derive for items defined inside a function receive incorrect span information #47983
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Steps to reproduce (
rustc 1.25.0-nightly (56733bc9f 2018-02-01))src/main.rs
src/lib.rs
The
structtoken will have an incorrect span which points at the correct source code, but shows<macro expansion>:1:1instead of a file/line number when used. Every other token will have a useless spanSpan { lo: BytePos(0), hi: BytePos(0), ctxt: #0 }