Closed MrRobb closed 4 years ago
Hi,
This is similar to the issue described here on the Gitter chat. The solution was updating Rust to latest version.
Let me know if that works for you!
the latest version of rust is 1.38.0? doens't work here, in macos high sierra.
Compiling emu_macro v0.1.0
error[E0277]: the trait bound `syn::Expr: std::convert::From<quote::__rt::TokenStream>` is not satisfied
--> /Users/labmint2/.cargo/registry/src/github.com-1ecc6299db9ec823/emu_macro-0.1.0/src/passing.rs:337:50
|
337 | let gpu_ident = quote! {gpu}.into();
| ^^^^ the trait `std::convert::From<quote::__rt::TokenStream>` is not implemented for `syn::Expr`
|
= help: the following implementations were found:
<syn::Expr as std::convert::From<syn::ExprArray>>
<syn::Expr as std::convert::From<syn::ExprAssign>>
<syn::Expr as std::convert::From<syn::ExprAssignOp>>
<syn::Expr as std::convert::From<syn::ExprAsync>>
and 35 others
= note: required because of the requirements on the impl of `std::convert::Into<syn::Expr>` for `quote::__rt::TokenStream`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
I've tried compiling on Windows and Linux on Rust 1.38.0 and build has been successful.
stable-x86_64-pc-windows-msvc unchanged - rustc 1.38.0 (625451e37 2019-09-23)
stable-x86_64-unknown-linux-gnu updated - rustc 1.38.0 (625451e37 2019-09-23)
@MrRobb are you also on MacOS?
However, interestingly, when I look at the docs the error message seems correct. From<proc_macro2::TokenStream>
is implemented but not From<quote::__rt::TokenStream>
.
I'll try to switch to proc_macro2::TokenStream
and see if that can be done without regression when I get a chance.
I tried several versions of rust and got the same error, older versions and nightly
I've replicated the issue and I'm really not sure how to resolve it. Digging into quote
source code, it seems like there is a runtime.rs
module that makes a pub use proc_macro2::*
. So somehow that seems to be creating 2 copies of proc_macro2
and that's causing type mismatch errors which the .into()
then fails to convert into the correct type.
I don't actually have that much experience with Rust so it would be great if someone could git clone
this, change em/Cargo.toml
's emu_macro = 0.1.0
to emu_macro = { path = "../emu_macro" }
, and try to fix the type mismatch error.
Or, if anyone has ideas for how to fix this, please let me know.
@calebwin I am using MacOS Catalina and Rust 1.38.0.
unfortunately I also know very little about rust to help solve, I started learning this week for a college GPU job. I will use version 0.2.0, which compiled here.
This version uses quote 0.6.13
@MrRobb @Micael106 I think I fixed the issue; the fix is pushed to the dev branch.
Would you mind cloning it and testing it out? If it works fine, I will probably pull it into the master branch and then publish the fix.
it's working now. thank you!
Yay! I'll pull into master and publish an update when I get a chance.
Not sure if you've had a chance to pull it in yet, just reporting in that the dev branch works but not master for me
Yeah. The dev branch works but not the master. I haven't pulled in dev yet.
On Sun, Feb 2, 2020 at 8:07 PM Jonathan Kelley notifications@github.com wrote:
Not sure if you've had a chance to pull it in yet, just reporting in that the dev branch works but not master for me
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/calebwin/emu/issues/27?email_source=notifications&email_token=AE6H6FLECPHZIUBDQM5FH6DRA6KBLA5CNFSM4JF6BXN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKSNMUA#issuecomment-581228112, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6H6FPUMLVIJVANW4QUWNTRA6KBLANCNFSM4JF6BXNQ .
Hello, I am trying the example:
Here's the error.
Am I doing something wrong? Thank you.