Get rid of the absolute path printer in type mismatch diagnostics#116813
Closed
Noratrieb wants to merge 1 commit intorust-lang:masterfrom
Closed
Get rid of the absolute path printer in type mismatch diagnostics#116813Noratrieb wants to merge 1 commit intorust-lang:masterfrom
Noratrieb wants to merge 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
86f397e to
a65f369
Compare
This comment has been minimized.
This comment has been minimized.
The logic was added in rust-lang#42826. The tests for it (`run-make/type-mismatch-same-crate-name` and `ui/type/type/type-mismatch-same-crate-name.rs) pass when being replaced by this, which makes sense, as `no_trimmed!(no_visible!())` should be equivalent to the custom absolute printer.
a65f369 to
8572eac
Compare
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
cjgillot
reviewed
Oct 16, 2023
| || abs_path(did1)? == abs_path(did2)?) | ||
| }; | ||
| if same_path().unwrap_or(false) { | ||
| // We check for both equality of their definition paths (when the crates have the same name) anbd equality |
Contributor
There was a problem hiding this comment.
Suggested change
| // We check for both equality of their definition paths (when the crates have the same name) anbd equality | |
| // We check for both equality of their definition paths (when the crates have the same name) and equality |
Member
Author
|
The test failure happens because This makes me think that we do need the special "absolute path" printer here... |
Collaborator
|
☔ The latest upstream changes (presumably #116815) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
The logic was added in #42826.
The test for it (
run-make/type-mismatch-same-crate-name) passes when just using the macros to control pretty printing. Note that the test does fail unless both of the macros are used, indicating that we're doing something right.