Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Can't build proc-macro-hack 0.5.6 on Fedora Rawhide #33

Closed
ignatenkobrain opened this issue May 9, 2019 · 2 comments
Closed

Can't build proc-macro-hack 0.5.6 on Fedora Rawhide #33

ignatenkobrain opened this issue May 9, 2019 · 2 comments

Comments

@ignatenkobrain
Copy link
Contributor

BUILDSTDERR: error[E0382]: capture of moved value: `vis`
BUILDSTDERR:    --> src/lib.rs:425:14
BUILDSTDERR:     |
BUILDSTDERR: 414 |     let crate_prefix = vis.map(|_| quote!($crate::));
BUILDSTDERR:     |                        --- value moved here
BUILDSTDERR: ...
BUILDSTDERR: 425 |         .map(|Macro { name, export_as }| {
BUILDSTDERR:     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^ value captured here after move
BUILDSTDERR:     |
BUILDSTDERR:     = note: move occurs because `vis` has type `std::option::Option<syn::token::Pub>`, which does not implement the `Copy` trait

Might be related of using syn v0.15.33, but not sure. Testing this more.

@dtolnay
Copy link
Owner

dtolnay commented May 9, 2019

Thanks! It looks like Syn tokens have Copy if syn/clone-impls is enabled, which we don't enable in proc-macro-hack, but Cargo seems to enable anyway because one of our dev-dependencies depends on Syn with default features which includes clone-impls.

I released proc-macro-hack 0.5.7 which depends on syn with clone-impls enabled.

@ignatenkobrain
Copy link
Contributor Author

Thanks! Building 0.5.7 for Fedora right away.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants