-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
libstd docs of re-exported macros are unformatted #26560
Comments
Of course you don't need the |
The formatting issue's a dup of #20923. Not sure if the src link being broken's been filed. |
The src link at the re-exported macro is gone, so closing. |
I think this issue is relevant again. The solution for the dup was to refactor error reporting system, which doesn't solve the formatting issues in the docs. |
I suspect that a quick solution to this problem may be to remove (or replace with At least it would put everything onto the same line. |
I don't think that's a great fix. I think the problem is that re-exported macros are stored into metadata in tokenized form, losing the original source formatting. |
It looks more like that line you found is what prints each rule. Digging further, it seems to go through a ToSource trait which eventually calls |
I'm a little surprised that the highlighting doesn't work correctly, after looking at https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/highlight.rs#L245. I don't believe there is much we can do about the formatting that comes from Until then I think the solution would be to manually handle the formatting given a TokenStream. Last night I was going to try to do some debugging to see why the |
I ran across another manifestation of this today: the reexported version of Entry in std::collections::btree_map::Entry uses |
Triage: the formatting is still a bit strange; the src links work great though. |
I think this may be a duplicate of #36722. |
One example is the
unreachable!
macro, though I think I've seen it elsewhere. The documention of the macro in libcore is fine, but the docs of the same macro in libstd have the source formatting all weird, and the actual[src]
link is broken.The text was updated successfully, but these errors were encountered: