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

Error running with nightly #17

Open
glennpierce opened this issue Aug 3, 2017 · 4 comments
Open

Error running with nightly #17

glennpierce opened this issue Aug 3, 2017 · 4 comments

Comments

@glennpierce
Copy link

I can only seem to run with nightly-2017-06-29 later versions give
I think the issue is fixed in https://github.com/zslayton but not your local fork.

error: use of unstable library feature 'iterator_step_by': unstable replacement of Range::step_by (see issue #27741)
--> /home/glenn/.cargo/git/checkouts/cron-652715304a961849/bcd3b79/src/time_unit/mod.rs:79:55
|
79 | Ok((start..Self::inclusive_max() + 1).step_by(step).collect())
| ^^^^^^^
|
= help: add #![feature(iterator_step_by)] to the crate attributes to enable

error[E0308]: mismatched types
--> /home/glenn/.cargo/git/checkouts/cron-652715304a961849/bcd3b79/src/time_unit/mod.rs:79:63
|
79 | Ok((start..Self::inclusive_max() + 1).step_by(step).collect())
| ^^^^ expected usize, found u32

PS do you think it is doable to fork a version that runs on stable rust ?

I ask as the unstable features
#![feature(collections_range)]
#![feature(conservative_impl_trait)]
#![feature(step_by)]

don't seem to be moving towards stable very fast and I wonder if it would be easier for me to fork to use stable features. (Haven't looked at the code yet so I don't know if it is worth my time)

Thanks

@mehcode
Copy link
Owner

mehcode commented Aug 3, 2017

cron hasn't had a new release that fixes that sadly. We could pin a git version I suppose as its been a few months and the fix is on master. @zslayton Anything I can do to help here?


This crate doesn't actually use any unstable features. They're all in cron.

  • iterator_step_by is planned to be coming out in Rust 1.21 (~ October 12)
  • conservative_impl_trait (same as above)

step_by could be replaced with https://github.com/saghm/stepper
conservative_impl_trait is only used once and could be replaced by a little macro

@zslayton
Copy link

zslayton commented Aug 3, 2017

I'm going to publish an updated version of the crate to fix the build issue this evening.

I'd be ok with replacing step_by, but I have a pull request pending that will make heavier use of impl Trait. That too could be supplanted by new data types, but it'd be more work. Getting onto stable is a worthwhile goal, though. Let me give this some thought.

@zslayton
Copy link

zslayton commented Aug 4, 2017

I've published v0.4 to crates.io.

@mehcode
Copy link
Owner

mehcode commented Aug 13, 2017

@zslayton Awesome, thanks. I'll get that integrated into here soon.

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

3 participants