Rename source to span and span to source#82994
Merged
bors merged 8 commits intorust-lang:masterfrom Mar 23, 2021
Merged
Conversation
Contributor
|
Some changes occurred in intra-doc-links. cc @jyn514 |
Member
Author
|
This will likely conflict with #82993 so probably one of these should be merged before the other. |
5eb5be2 to
0ee92b9
Compare
Member
Author
|
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
Member
Why this change? |
Member
Author
Quoting from the commit message:
|
Member
Author
|
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
jyn514
reviewed
Mar 22, 2021
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Member
|
Looks great, thanks! @bors r+ |
Collaborator
|
📌 Commit d5f2bb2 has been approved by |
Collaborator
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Mar 23, 2021
…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
Collaborator
|
☀️ Test successful - checks-actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clean::Item.sourcetospanclean::Span::span()toclean::Span::inner()rustdoc_json_types::Item.sourcetospanImport.spantoImport.sourceSee also the discussion on Zulip (this is a bit more than discussed in
that conversation, but all the changes are related).
r? @jyn514