-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rename source
to span
and span
to source
#82994
Conversation
Some changes occurred in intra-doc-links. cc @jyn514 |
This will likely conflict with #82993 so probably one of these should be merged before the other. |
5eb5be2
to
0ee92b9
Compare
Rebased to fix conflicts. |
This comment has been minimized.
This comment has been minimized.
0ee92b9
to
3261656
Compare
This comment has been minimized.
This comment has been minimized.
3261656
to
a32a68a
Compare
Why this change? |
Quoting from the commit message:
|
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.
LGTM with the nits fixed :)
Addressed most of the comments, but I'm waiting on a response on #82994 (comment). |
This comment has been minimized.
This comment has been minimized.
Its type is called `clean::Span`, and also the name in the rest of rustdoc and rustc for this kind of field is `span`.
Otherwise you get a lot of instances of `item.span.span()`, which is just plain confusing. `item.span.inner()` conveys the correct meaning of "get the type that `clean::Span` wraps".
* It is called `source` in rustc and the rest of rustdoc * It is not a span, rather it is the source of the import
The rustdoc-json-types renames are breaking changes.
...and add docs to the types instead of the fields that hold the types.
These tests were added to master after I made my changes.
6253c88
to
99ff276
Compare
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Looks great, thanks! @bors r+ |
📌 Commit d5f2bb2 has been approved by |
…n514 Rename `source` to `span` and `span` to `source` - Rename `clean::Item.source` to `span` - Rename `clean::Span::span()` to `clean::Span::inner()` - Rename `rustdoc_json_types::Item.source` to `span` - rustdoc-json: Rename `Import.span` to `Import.source` *See also the [discussion on Zulip][z] (this is a bit more than discussed in that conversation, but all the changes are related).* r? ``@jyn514`` [z]: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/get.20span.20of.20file.20from.20name/near/229603729
☀️ Test successful - checks-actions |
clean::Item.source
tospan
clean::Span::span()
toclean::Span::inner()
rustdoc_json_types::Item.source
tospan
Import.span
toImport.source
See also the discussion on Zulip (this is a bit more than discussed in
that conversation, but all the changes are related).
r? @jyn514