-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc breaking change in #84445 - #
in line start is not stripped
#84502
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
Comments
#
hidden lines are not hidden#
in line start is not stripped
This is a problem with rustdoc's imprecise parsing (#84478). Before, rustdoc hid your code, but rejected the following valid code: # [inline]
fn main() {} Now it accepts |
Well, I guess fixing this doesn't actually require reverting all of #84445, it just requires special casing |
This is a breaking change, regardless of why, incompatible with
And it's not just my code. See dtolnay/seq-macro#10. I imagine when this eventually hits stable, you'll find a lot more code broken, too.
I'm not sure what "both" refers to here. I expect the code I had to work - a line that starts with
Please don't add more special cases. |
Can confirm that this has also broken rustdoc tests in PyO3 on our nightly CI job: https://github.com/PyO3/pyo3/pull/1128/checks?check_run_id=2425867141 |
I just took a look whether I could implement such a PR, but then got uneasy because that code looks like it's going to grow a long list of special cases. As we already have three examples of #84445 breaking code in the wild, I would suggest it's safer to just revert. If we try to add new special cases to fix those reported here, I'm worried when #84445 finally hits stable we'll get a bunch of regressions reported in cases which people never tested on nightly. We know that the proper fix is #84478, and it's unfortunate reverting means #83284 will remain broken for longer. This just seems like the safer option to me. |
Btw, this is a related minimal repro I was able to demonstrate:
Passes on stable, fails on nightly |
…Gomez Revert "rustdoc: Hide `#text` in doc-tests" See discussion in rust-lang#84502 - I'm worried that rust-lang#84445 may cause a lot of breakages if this were to hit stable, so I think it's safer to revert and work on the known correct fix rust-lang#84478.
This was reverted in #84511. |
Rocket has:
Previously, the
#
s in the second string were stripped byrustdoc
, and so the string passed to the macro did not contain the leading#
s. Now, they are not stripped, and so a string with#
s gets passed to the macro, causing the test to fail.cc #84445, @GuillaumeGomez, @jyn514
@rustbot modify labels: +regression-from-stable-to-nightly
The text was updated successfully, but these errors were encountered: