-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Docs. on hover for cfg_attr'
#18444
Comments
@rustbot label: +A-hover |
I think we do evaluate cfg_attrs here, but we don't set cfg(doc). You can try adding it to |
How do I add it? I've tried setting it to |
Oh we do evaluate cfgs, but even if you set cfg(doc) we don't currently support |
I wanted to close this, but we don't support code that's gated for a different platform, so it might actually be a good idea to enable |
I'm not sure we should enable |
There seems to be a misunderstandment: When I hover over the
That's what's lost with |
Ah that's indeed a different thing, and it isn't unique to |
Enabling Would it be possible to just expand |
Example:
The code fragment above will display documentation on hover when the user hovers over
doc
, and overinclude_str
. Both with their respective documentation.If the user instead uses
#[cfg_attr(doc, doc = include_str!(...))]
, which reduces compilation time, no documentation will be shown fordoc
orinclude_str
.It would be excellent if we could treat the second meta item in the metalist for
cfg_attr
as it's own attribute (because it is)The text was updated successfully, but these errors were encountered: