verus-lang / verus

Verified Rust for low-level systems code
MIT License
1.15k stars 66 forks source link

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

Closed ouuan closed 4 months ago

ouuan commented 4 months ago

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 commented 4 months ago

Oh, I just found https://github.com/verus-lang/verus/blob/8e7e368d7be270c49461c940375e1b770d95851a/source/tools/line_count/.cargo/config.toml#L1-L2

Somehow my cargo is not reading it.

ouuan commented 4 months ago

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: https://github.com/rust-lang/cargo/issues/5376#issuecomment-1241338420