rrevenantt / better_any

Better type id and Any for Rust
Apache License 2.0
11 stars 5 forks source link

syn::export::toTokens; could not be found #3

Closed jakevossen5 closed 3 years ago

jakevossen5 commented 3 years ago

Running cargo check in better_typeid_derive gives me this error (on stable and nightly)

error[E0432]: unresolved import `syn::export`
 --> better_typeid_derive/src/lib.rs:5:10
  |
5 | use syn::export::ToTokens;
  |          ^^^^^^ could not find `export` in `syn`

Seems like NuShell had a similar issue a bit ago and fixed it by pinning an older version of syn: https://github.com/nushell/nushell/issues/2867

Note I am actually here because of an issue with antlr4rust: https://github.com/rrevenantt/antlr4rust

rrevenantt commented 3 years ago

yeah, caused by recent syn update, I will try to fix it tomorrow. Meanwhile as temporary fix you can add lower version in your cargo.toml

[dev-dependencies]
syn="=1.0.56"
rrevenantt commented 3 years ago

Should be fixed now, looks like it was originally caused by intellij-rust not respecting #[doc(hidden)] attribute when automatically adding imports.