Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elichai opened this issue Jul 4, 2020 · 1 comment
Open

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

elichai opened this issue Jul 4, 2020 · 1 comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-proc-macros Area: Procedural macros C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@elichai
Copy link
Contributor

elichai commented Jul 4, 2020

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

@elichai elichai added the C-bug Category: This is a bug. label Jul 4, 2020
@SNCPlay42
Copy link
Contributor

SNCPlay42 commented Jul 4, 2020

Looks to me like #72306 changed some behavior that affects spans, and fixed this as a result.

The symptoms look sufficiently different from the issues #72306 intentionally fixed that a regression test for this specifically might be worthwhile.

@rustbot modify labels: E-needs-mcve E-needs-test

@rustbot rustbot added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. labels Jul 4, 2020
@Alexendoo Alexendoo added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-proc-macros Area: Procedural macros T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-proc-macros Area: Procedural macros C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants