I'm having a new trouble when I build anchor initial project today:
error[E0599]: no method named local_file found for struct proc_macro2::Span in the current scope
--> /home/haodev007/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anchor-syn-0.31.1/src/idl/defined.rs:501:22
|
500 | let source_path = proc_macro2::Span::call_site()
| ______________-
501 | | .local_file()
| | -^^^^^^^^^^ method not found in Span
| ||
|
I've checked the issue #3662 yesterday and downgraded proc-macro2 crate version
cargo update -p proc-macro2 --precise 1.0.94
It worked with anchor version 0.31.0 yesterday after downgraded proc-macro2 version but it doesnt work again
current rust and anchor version is
rustc 1.86.0 (05f9846f8 2025-03-31)
anchor-cli 0.31.1
Please help me, thanks!
I'm having a new trouble when I build anchor initial project today:
error[E0599]: no method named
local_filefound for structproc_macro2::Spanin the current scope--> /home/haodev007/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anchor-syn-0.31.1/src/idl/defined.rs:501:22
|
500 | let source_path = proc_macro2::Span::call_site()
| ______________-
501 | | .local_file()
| | -^^^^^^^^^^ method not found in
Span| ||
|
I've checked the issue #3662 yesterday and downgraded proc-macro2 crate version
cargo update -p proc-macro2 --precise 1.0.94It worked with anchor version
0.31.0yesterday after downgradedproc-macro2version but it doesnt work againcurrent rust and anchor version is
rustc 1.86.0 (05f9846f8 2025-03-31)anchor-cli 0.31.1Please help me, thanks!