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

Add missing span-locations feature for proc-macro2 in line_count #1128

Closed
wants to merge 1 commit into from

Conversation

ouuan
Copy link
Contributor

@ouuan ouuan commented May 19, 2024

I faced compilation errors without this feature flag. This feature has been required since proc-macro2 1.0.25, so this should be already broken when the line_count tool was first added. I'm wondering why this was not discovered earlier 🤔️

@ouuan
Copy link
Contributor Author

ouuan commented May 19, 2024

Oh, I just found

[build]
rustflags = "--cfg proc_macro_span --cfg span_locations"

Somehow my cargo is not reading it.

@ouuan
Copy link
Contributor Author

ouuan commented May 19, 2024

Oh, I have the following in my ~/.cargo/config.toml to use mold. The target-specific setting overrode the project local setting 🥲

[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang"
rustflags = [
    "-Clink-arg=-fuse-ld=/usr/bin/mold",
]

reference: rust-lang/cargo#5376 (comment)

@ouuan ouuan closed this May 19, 2024
@ouuan ouuan deleted the line-count-proc-macro2-feature branch May 19, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant