-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Get rid of the absolute path printer in type mismatch diagnostics #116813
Conversation
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
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
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
The job Click to see the possible cause of the failure (guessed by this bot)
|
|| 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 |
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.
// 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 |
The test failure happens because This makes me think that we do need the special "absolute path" printer here... |
☔ The latest upstream changes (presumably #116815) made this pull request unmergeable. Please resolve the merge conflicts. |
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.