-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
std::line macro can be wrong in 1.44.1 stable under proc-macros #74035
Copy link
Copy link
Closed as not planned
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-bugCategory: This is a bug.Category: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.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
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-bugCategory: This is a bug.Category: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.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
No fields configured for issues without a type.
Hi,
This issue seems to be solved on nightly but I couldn't find an explicit change in that code, so if this issue isn't helpful feel free to close.
I have a proc-macro that generates loggings, and on one occurrence it gets the line number wrong on stable but right on nightly:
The test: https://github.com/elichai/log-derive/blob/2020-test-logger/tests/first.rs#L121
Fails on stable: https://travis-ci.com/github/elichai/log-derive/jobs/357565126#L305
Passes on nightly: https://travis-ci.com/github/elichai/log-derive/jobs/357565129#L314
Using
cargo-bisect-rustcI found that the bug was fixed in a9ca1ec (https://pastebin.com/raw/0rwkWwZU) but I don't see anything related thereIf this is helpful I can try and create a minimal reproducible code, but because it's fixed in nightly I'm not sure if it's worth the time