Skip to content

Compile on stable Rust 2018 #13

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

Closed
7 tasks done
LukasKalbertodt opened this issue Jul 20, 2018 · 5 comments
Closed
7 tasks done

Compile on stable Rust 2018 #13

LukasKalbertodt opened this issue Jul 20, 2018 · 5 comments

Comments

@LukasKalbertodt
Copy link
Member

LukasKalbertodt commented Jul 20, 2018

It would be neat to be able to use this on stable (once use_extern_macros is stabilized). Currently the following features are activated:

  • #![feature(in_band_lifetimes)]: tracking issue, expected to be stabilized for Rust 2018. If not, we can easily remove the feature by changing one line of code. => probably won't be stabilized, so this has been removed from this crate for now.
  • #![feature(proc_macro_span)]: used only for one Span::join() call. I think it's easy to remove join() with something we can use on stable. => guarded by nightly feature (see Guard unstable proc_macro things behind nightly feature #26)
  • #![feature(proc_macro_diagnostic)]: this is the big part! I don't think the Diagnostics API will be stabilized in near future. So in order to compile on stable, we need to replace all nice diagnostics with simple panics. This shouldn't be too hard. => guarded by nightly feature (see Guard unstable proc_macro things behind nightly feature #26)

We still use Cargo's cargo-features = ["edition"] (EDIT: it's stabilized on nightly and beta RC1 now) with edition ="2018" which entails a couple of features. But all of these should be stabilized for Rust 2018 (EDIT: they are now).

@LukasKalbertodt LukasKalbertodt added this to the v0.3 milestone Jul 20, 2018
@Mark-Simulacrum
Copy link

replace all nice diagnostics with simple panics.

I would instead use the compile_error macro -- that'll give you slightly nicer error messages and it is already stable.

@LukasKalbertodt
Copy link
Member Author

@Mark-Simulacrum Awesome idea! I'll certainly try that!

@LukasKalbertodt
Copy link
Member Author

I think we should release a new version before the official Rust 2018 release. So I removed the v0.3 milestone.

@LukasKalbertodt
Copy link
Member Author

LukasKalbertodt commented Sep 21, 2018

With #31 this crate compiles on beta RC1. So we're on track for having this compile on stable Rust 2018. I guess we'll keep this issue open until the real Rust 2018 is released and we can be sure that all is fine.

EDIT: Also compiles with rustc 1.31.0-beta.1 (2824a67b0 2018-10-29)
EDIT2: Also compiles with rustc 1.31.0-beta.19 (42053f9f0 2018-11-26)

@LukasKalbertodt
Copy link
Member Author

Seems to work with Rust 2018 (1.31), so I'm gonna close this :)

Happy Rust2018!

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

2 participants