-
Notifications
You must be signed in to change notification settings - Fork 13.3k
multiline cfg_attr in a doctest outputs a corrupted snippet #55713
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
I don't see a message associated with the stack trace, is that missing? |
The problem lies in how rustdoc parses doctests. It scans lines for crate-level attributes and Lines 502 to 521 in bdfeace
We recently changed the parsing for The way to fix the test in the OP is to actually remove the |
@eddyb This is the associated message:
|
With following doctest, where the cfg attribute spans multiple lines, the final program is invalid: the wrapping
main
method doesn't take into account the danglingstdsimd))]
line that closes the attribute.Meta
The text was updated successfully, but these errors were encountered: