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

pin-project 0.3.3 introduces breaking changes about "missing extern crate core" compared to 0.3.2 #16

Closed
shepmaster opened this issue Jul 21, 2019 · 3 comments · Fixed by #17
Assignees
Labels
C-bug Category: related to a bug. regression Regression from a previous version

Comments

@shepmaster
Copy link

0.3.2

$ cargo update -p pin-project --precise 0.3.2
    Updating crates.io index
    Updating pin-project v0.3.3 -> v0.3.2

$ cargo test
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running target/debug/deps/futures_compat-27fb39e639db3ee7

running 1 test
test implements_error ... ok

0.3.3

$ cargo update -p pin-project --precise 0.3.3
    Updating crates.io index
    Updating pin-project v0.3.2 -> v0.3.3

$ cargo test
   Compiling snafu v0.4.1 (/Users/shep/Projects/snafu)
error[E0433]: failed to resolve: maybe a missing `extern crate core;`?
   --> /Users/shep/Projects/snafu/src/futures/try_future.rs:127:18
    |
127 | #[unsafe_project(Unpin)]
    |                  ^^^^^ maybe a missing `extern crate core;`?

error[E0433]: failed to resolve: maybe a missing `extern crate core;`?
   --> /Users/shep/Projects/snafu/src/futures/try_future.rs:166:18
    |
166 | #[unsafe_project(Unpin)]
    |                  ^^^^^ maybe a missing `extern crate core;`?

error[E0433]: failed to resolve: maybe a missing `extern crate core;`?
   --> /Users/shep/Projects/snafu/src/futures/try_stream.rs:129:18
    |
129 | #[unsafe_project(Unpin)]
    |                  ^^^^^ maybe a missing `extern crate core;`?

error[E0433]: failed to resolve: maybe a missing `extern crate core;`?
   --> /Users/shep/Projects/snafu/src/futures/try_stream.rs:171:18
    |
171 | #[unsafe_project(Unpin)]
    |                  ^^^^^ maybe a missing `extern crate core;`?

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0433`.
error: Could not compile `snafu`.
@taiki-e
Copy link
Owner

taiki-e commented Jul 21, 2019

@shepmaster Thanks for the reporting!
I yanked 0.3.3.

I think that is related to 7efdfc6 or eee7fa9. I will investigate.

@taiki-e taiki-e pinned this issue Jul 21, 2019
@taiki-e taiki-e self-assigned this Jul 21, 2019
@taiki-e
Copy link
Owner

taiki-e commented Jul 21, 2019

The cause is this code added in 7efdfc6:

quote_spanned! { span =>
impl #impl_generics ::core::marker::Unpin for #ident #ty_generics #where_clause {}
}

Span contains information about the edition. So if pin-project is used in 2015 edition's crate, ::core::marker::Unpin is handled as code defined in the 2015 edition. Then 2015 edition's import rule is applied.

bors bot added a commit that referenced this issue Jul 21, 2019
17: Remove usage of quote_spanned r=taiki-e a=taiki-e

Fixes #16

Co-authored-by: Taiki Endo <te316e89@gmail.com>
@bors bors bot closed this as completed in #17 Jul 21, 2019
@taiki-e
Copy link
Owner

taiki-e commented Jul 21, 2019

Published 0.3.4 which fixes this issue.

@taiki-e taiki-e unpinned this issue Jul 21, 2019
@taiki-e taiki-e added the C-bug Category: related to a bug. label Sep 23, 2019
@taiki-e taiki-e added the regression Regression from a previous version label May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: related to a bug. regression Regression from a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants