Marking remapping with an enum, instead of a bool#75616
Closed
Nicholas-Baron wants to merge 11 commits intorust-lang:masterfrom
Closed
Marking remapping with an enum, instead of a bool#75616Nicholas-Baron wants to merge 11 commits intorust-lang:masterfrom
Nicholas-Baron wants to merge 11 commits intorust-lang:masterfrom
Conversation
Contributor
|
r? @lcnr (rust_highfive has picked a reviewer for you, use r? to override) |
Nicholas-Baron
commented
Aug 17, 2020
Nicholas-Baron
commented
Aug 17, 2020
src/librustc_span/lib.rs
Outdated
Contributor
Author
There was a problem hiding this comment.
Is this field necessary? Could it instead be derived from the state of unmapped_name and name?
Collaborator
|
☔ The latest upstream changes (presumably #75563) made this pull request unmergeable. Please resolve the merge conflicts. |
This commit is rather large, as simply moving from boolean to enum marking results in many places in the crate changing. This commit does not compile as the `Name` would have to be `pub`, which may result in even more changes required and is not part of the originally proposed cleanup.
Use the `new` function instead of an if
This commit has the rustc_span crate compiling, but its dependents need to be updated. It seems that the was_remapped bool is unused. It will probably be removed before the branch lands.
`name.name()` seems a bit awkward, but it follows the semantics from the old code.
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.
Solves #75550
This branch moves three fields relating to the name of a file of the
SourceFilestruct fromrustc_spanand moves them to a separate struct. The intent is to encapulate the state of the fields.