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

rustdoc: allow individual doctests to select their edition #52961

Closed
QuietMisdreavus opened this issue Aug 1, 2018 · 1 comment
Closed

rustdoc: allow individual doctests to select their edition #52961

QuietMisdreavus opened this issue Aug 1, 2018 · 1 comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@QuietMisdreavus
Copy link
Member

Right now, doctests will compile in the edition that the rest of the crate is set for. However, if you specifically want to show off how your crate interacts in various editions, there's no way to do that right now.

It would be cool if we had a way to set an edition2015/edition2018/etc flag on doctests so that we could specifically compile a doctest in a certain version. It would be even cooler if we then connected this to a little banner on the code sample, like we currently do with ignore and compile_fail.

cc @rust-lang/rustdoc

(when i get a moment, i'll set up some mentoring instructions...)

@QuietMisdreavus QuietMisdreavus added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Aug 1, 2018
@QuietMisdreavus
Copy link
Member Author

Ah, wait, this is a duplicate of #52623.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant