unknown feature `proc_macro_span_shrink`



I encounter below error when run command anchor build.

error[E0635]: unknown feature `proc_macro_span_shrink`

Solution is downgrading proc-macro2 to 1.0.43 :

cargo update -p proc-macro2 --precise 1.0.43

Reference