rustdoc: allow individual doctests to select their edition #52961
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.
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 withignore
andcompile_fail
.cc @rust-lang/rustdoc
(when i get a moment, i'll set up some mentoring instructions...)
The text was updated successfully, but these errors were encountered: