-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add is_inner
information to rustdoc-json-types
#140409
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
Add is_inner
information to rustdoc-json-types
#140409
Conversation
Some changes occurred in tests/rustdoc-json rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing |
This comment has been minimized.
This comment has been minimized.
18c64ff
to
1ca7cb1
Compare
Removed the extra empty line at the end of the file. ^^' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiler changes looks good.
1ca7cb1
to
190643d
Compare
What's the purpose of doing this? Is their any time when someone would want this information from rustdoc-json? My instinct is that the differentiation between inner and outer attributes is purely syntactic, and therefor it's fine for rustdoc-json to not contain this information. |
I have to admit that I mostly wanted a pretext to add a new |
Now that I think about it: some attributes are only allowed to be inner only (and at crate levels). I think it's actually kinda important to allow users to know if it's inner or outer because of this. |
What use-case do you have for this?
Why? In what case does a rustdoc-json consumer need to know if an item is inner or outer. |
Same as for other spans I suppose? But if you don't think it's ever useful, it's fine not to add it. I'm not a rustdoc JSON user after all. 😆
Well, no idea. So maybe never? |
I think in that case I'm gonna close this. If someone has a use-case for when they'd want this information, I'd be happy to reconsider. |
No problem! :) |
Part of #137645.
Since it adds more information for attributes, I suppose the next step could be to add
span
on them as well.cc @Urgau for the compiler changes.
r? @aDotInTheVoid