Skip to content

std::line macro can be wrong in 1.44.1 stable under proc-macros #74035

Open
@elichai

Description

@elichai

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 there

If 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-proc-macrosArea: Procedural macrosC-bugCategory: This is a bug.E-needs-mcveCall 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.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions