Skip to content

Comments

Draft: Remove all feature gates #27

Closed
ambaxter wants to merge 2 commits intoSergioBenitez:masterfrom
ambaxter:try_stable_beta
Closed

Draft: Remove all feature gates #27
ambaxter wants to merge 2 commits intoSergioBenitez:masterfrom
ambaxter:try_stable_beta

Conversation

@ambaxter
Copy link

@ambaxter ambaxter commented Jul 1, 2020

I've created a branch that requires no feature gates and compiles for the most part on beta.

The only remaining nightly-only functionality is Span.join which is nightly only: https://doc.rust-lang.org/proc_macro/struct.Span.html#method.join . Open issue is rust-lang/rust#54725

All macro compiles panic on https://github.com/SergioBenitez/Pear/blob/master/codegen/src/parser.rs#L168

ambaxter added 2 commits July 1, 2020 10:23
Pear can be compiled on stable without it. Macro hygiene appears to be the last blocker.

Signed-off-by: Adam Baxter <ambaxter@users.noreply.github.com>
@ambaxter ambaxter mentioned this pull request Jul 1, 2020
11 tasks
@macpp
Copy link

macpp commented Jul 8, 2020

@ambaxter this is panicking because you are actually using Span::join() from proc_macro2 crate https://docs.rs/proc-macro2/1.0.18/proc_macro2/struct.Span.html#method.join (which will always return None on non-nightly rust). You should probably do something similar to pr #25 (or just unwrap_or(Span::call_site()) , but that's last resort)

@SergioBenitez
Copy link
Owner

Thank you! Migrating the crate to stable is/was unfortunately more involved than this PR would allude. The efforts to migrate the crate were also already underway. I've pushed the completed migration at 333c9bf. Pear now compiles on stable!

@ambaxter ambaxter deleted the try_stable_beta branch July 14, 2020 13:57
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

Successfully merging this pull request may close these issues.

3 participants