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

Add support for Rust edition #1100

Closed
wants to merge 2 commits into from
Closed

Add support for Rust edition #1100

wants to merge 2 commits into from

Conversation

kpp
Copy link
Contributor

@kpp kpp commented Nov 17, 2019

Books will have to replace ```rust with ```edition2018 everywhere to make it work, but it would be useful to change it in config only.

According to #812 (comment)

@ehuss
Copy link
Contributor

ehuss commented Nov 17, 2019

Oh, thanks for pushing this forward!

My preference would be to have a new top-level [rust] table where rust-specific configuration can go. We can add more things to it in the future (maybe even things like dependencies).

As for forwarding the configuration into the playground, it shouldn't be too hard. I think it would involve adding another field to RenderItemContext in hbs_renderer so the relevant information can make it into add_playpen_pre.

@kpp kpp marked this pull request as ready for review November 17, 2019 22:07
@kpp
Copy link
Contributor Author

kpp commented Nov 17, 2019

I feel bugs in the future. ```rust blocks are replaced with class="language-rust". How about pure ```edition2018 code blocks?

@ehuss
Copy link
Contributor

ehuss commented Nov 19, 2019

I feel bugs in the future. ```rust blocks are replaced with class="language-rust". How about pure ```edition2018 code blocks?

Hm, if I understand the question correctly: rustdoc treats code blocks with annotations like edition2018 or no_run as rust blocks, but mdbook does not render them as rust blocks. Is that what you are referring to?

That sounds like a separate issue, and something we can maybe deal with separately.

@kpp
Copy link
Contributor Author

kpp commented Nov 20, 2019

That sounds like a separate issue

I agree.

@kpp kpp requested a review from ehuss November 20, 2019 15:13
@ehuss
Copy link
Contributor

ehuss commented Nov 20, 2019

Can you also move it under a separate [rust] table?

@kpp
Copy link
Contributor Author

kpp commented Nov 20, 2019

It will take some time. I am not sure I will do that in a few days.

@ehuss
Copy link
Contributor

ehuss commented Apr 21, 2020

Completed via #1163.

@ehuss ehuss closed this Apr 21, 2020
@kpp kpp deleted the edition2018 branch April 21, 2020 20:09
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