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

Compilation failure on nightly 1.45.0 2020-05-24 #262

Closed
timvisee opened this issue May 25, 2020 · 5 comments
Closed

Compilation failure on nightly 1.45.0 2020-05-24 #262

timvisee opened this issue May 25, 2020 · 5 comments
Labels
C-bug Category: bug in current code C-upstream Category: nothing actionable in the time crate

Comments

@timvisee
Copy link

timvisee commented May 25, 2020

I just started seeing a compilation error in time-macros-impl v0.1.1 when using the latest Rust nightly, which I'm using in ffsend-api.

This may just be a temporary nightly regression, I'm not sure. I figured it'll be useful to track this here anyway.

Here's the Rust version that was used:

rustc 1.45.0-nightly (46e85b432 2020-05-24)
cargo 1.45.0-nightly (500b2bd01 2020-05-18)

Here is the error that comes up:

 error: expected identifier
  --> /usr/local/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/time-macros-impl-0.1.1/src/lib.rs:84:20
   |
84 |               pub fn $name(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
   |                      ^^^^^
...
91 | / impl_macros! {
92 | |     time: Time,
93 | |     offset: Offset,
94 | |     date: Date,
95 | | }
   | |_- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
error: could not compile `time-macros-impl`.

See the error on the bottom of this CI log here:
https://gitlab.com/timvisee/ffsend-api/-/jobs/566079187#L735

@jhpratt
Copy link
Member

jhpratt commented May 25, 2020

I'll look into this when I'm on my laptop, but aftet quick look at the source code there, I see absolutely nothing wrong with how I've implemented that macro.

If this is in fact a regression that isn't on me, I'll file an issue on rust-land/rust pointing to this.

@timvisee
Copy link
Author

It appears someone already opened an issue for it a day ago: rust-lang/rust#72545

@jhpratt
Copy link
Member

jhpratt commented May 25, 2020

Looking at that issue, it appears as though it was an issue with proc macro hack, which has been fixed.

I believe the solution to this is to run cargo update, which will pull in the appropriate version of proc macro hack. If that doesn't work, let me know, and I'll see if publishing a new version myself helps.

@xStrom
Copy link

xStrom commented May 25, 2020

cargo update -p proc-macro-hack fixes the issue, no need for a new release.

@jhpratt
Copy link
Member

jhpratt commented May 25, 2020

Thanks for confirmation @xStrom! In that case, I'll just close this issue, leaving it as a signpost for anyone running into this.

@jhpratt jhpratt closed this as completed May 25, 2020
@jhpratt jhpratt added C-bug Category: bug in current code C-upstream Category: nothing actionable in the time crate labels May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug in current code C-upstream Category: nothing actionable in the time crate
Projects
None yet
Development

No branches or pull requests

3 participants