Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trait From<proc_macro::TokenStream> is not implemented for proc_macro2::TokenStream. mingw-w64-x86_64-rust #9

Open
vorchunpaul opened this issue Oct 6, 2021 · 0 comments

Comments

@vorchunpaul
Copy link

I am trying to compile gtk4 on windows via msys2 when using mingw of the rust compiler, but I get an error.

Compiling proc-macro-error-attr v1.0.4
error[E0277]: the trait bound `roc_macro2::TokenStream: From<proc_macro::TokenStream>`p is not satisfied
  --> C:\Users\paul\.cargo\registry\src\github.com-1ecc6299db9ec823\proc-macro-error-attr-1.0.4\src\lib.rs:38:38
   |
38 |     match impl_proc_macro_error(attr.into(), input.clone().into()) {
   |                                      ^^^^ the trait `From<proc_macro::TokenStream>` is not implemented for `proc_macro2::TokenStream`
   |
   = help: the following implementations were found:
             <proc_macro2::TokenStream as From<proc_macro2::TokenTree>>
   = note: required because of the requirements on the impl of `Into<proc_macro2::TokenStream>` for `proc_macro::TokenStream`

error[E0277]: the trait bound `proc_macro2::TokenStream: From<proc_macro::TokenStream>` is not satisfied
  --> C:\Users\paul\.cargo\registry\src\github.com-1ecc6299db9ec823\proc-macro-error-attr-1.0.4\src\lib.rs:38:60
   |
38 |     match impl_proc_macro_error(attr.into(), input.clone().into()) {
   |                                                            ^^^^ the trait `From<proc_macro::TokenStream>` is not implemented for `proc_macro2::TokenStream`
   |
   = help: the following implementations were found:
             <proc_macro2::TokenStream as From<proc_macro2::TokenTree>>
   = note: required because of the requirements on the impl of `Into<proc_macro2::TokenStream>` for `proc_macro::TokenStream`

error[E0277]: the trait bound `proc_macro2::TokenStream: From<proc_macro::TokenStream>` is not satisfied
   --> C:\Users\paul\.cargo\registry\src\github.com-1ecc6299db9ec823\proc-macro-error-attr-1.0.4\src\lib.rs:42:25
    |
42  |             let input = TokenStream2::from(input);
    |                         ^^^^^^^^^^^^^^^^^^ the trait `From<proc_macro::TokenStream>` is not implemented for `proc_macro2::TokenStream`
    |
    = help: the following implementations were found:
              <proc_macro2::TokenStream as From<proc_macro2::TokenTree>>
note: required by `from`

...
more error
...

However, if I try to compile this into a release, then everything is going without problems.

Cargo.toml

[package]
name = "gtk4-test"
version = "0.1.0"
edition = "2018"

[dependencies]
gtk = { version = "0.2", package = "gtk4" }
@vorchunpaul vorchunpaul changed the title Trait From<proc_macro::TokenStream> is not implemented for `proc_macro2::TokenStream. mingw-w64-x86_64-rust Trait From<proc_macro::TokenStream> is not implemented for proc_macro2::TokenStream. mingw-w64-x86_64-rust Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant