-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
regression 1.49: rustdoc runs indented documentation immediately after a header as a doctest #79911
Comments
Is there a way to see the full source for this? The error sounds like it's a doctest or something, not documentation directly. |
https://crater-reports.s3.amazonaws.com/beta-1.49-1/beta-2020-11-26/reg/auto-0.0.8/log.txt might also be related (that one is on crates.io) |
The bug is that this is being interpreted as a doctest instead of normal documentation. Not sure why yet. |
I think this was fa1b15f. |
MCVE: //!# Header
//! x
Stable ignores it, beta runs |
For context, //!# Header
//!
//! x
is run on a doctest on stable. So maybe newlines are getting discarded somewhere? |
I confirmed locally that reverting #78400 fixes the issue. |
It's because the header starts with |
@GuillaumeGomez can you clarify why this is expected behavior (not sure I fully follow your explanation above). This seems very unexpected to me. |
So I wrote a whole blog post explaining this change here. TLDR: Since the minimum indent is "0" because of If you don't want |
Will close as won't fix, but we should include in release notes. |
@XAMPPRocky Can we add an entry to the 1.49 release notes for this issue? It sounds like roughly
|
That'd be a good idea indeed! |
Closing, as it's now in relnotes. |
My guess is that rustdoc's behavior on parsing doc attributes has changed or something like that -- I recall seeing a PR changing how we handle things. Maybe for example previously \n in an attribute worked and now doesn't?
cc @rust-lang/rustdoc
The text was updated successfully, but these errors were encountered: