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

Fix running code #60

Merged
merged 2 commits into from
Mar 9, 2020
Merged

Fix running code #60

merged 2 commits into from
Mar 9, 2020

Conversation

funkill
Copy link
Contributor

@funkill funkill commented Nov 18, 2019

Ignore running some code (like partial includes) and fix sending Rust edition to playground (#31)

@funkill
Copy link
Contributor Author

funkill commented Nov 19, 2019

Some ignored code can run if copy some uses or other code from rs-files to md-files

@funkill funkill changed the title WIP: Fix running code Fix running code Nov 19, 2019
@cramertj
Copy link
Member

Is it possible to use 2018 edition everywhere rather than annotating it on each block? There shouldn't be any 2015e blocks anywhere in the book.

@funkill
Copy link
Contributor Author

funkill commented Nov 20, 2019

No. Mdbook by default uses 2015 edition and changing it to 2018 possible only for individual blocks (source code). With current version of mdbook we must annotate each code block.

@funkill
Copy link
Contributor Author

funkill commented Nov 20, 2019

Some hours ago opened PR in mdbook repo about setting 2018 edition globally. We can wait for accepting this PR.

@dunnock
Copy link

dunnock commented Dec 20, 2019

@funkill it seems it will take a while for mdbook to adopt. Example attributes does not seem a bad solution, at least it will explicitly show edition. After select section of this book was advertised in interview, probably it would make sense to accept this so that futures examples are working while people visiting page to make good impression?

@kngwyu
Copy link

kngwyu commented Mar 9, 2020

Looks run buttons are still broken and we need this PR merged.
mdbook's edition = "2018" is still not merged and we need annotation or patching book.js to make playpen work.

@cramertj
Copy link
Member

cramertj commented Mar 9, 2020

This seems like a pretty painful way to specify the 2018 edition, but it seems like a lot of people are hitting this, so it seems fine to me to merge. Sorry for the wait!

@cramertj cramertj merged commit d7651bb into rust-lang:master Mar 9, 2020
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.

4 participants