-
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
Ignore PhantomData when checking CoerceUnsized implementations #27483
Conversation
// Otherwise, simply copy the data from the source. | ||
assert_eq!(src_ty, target_ty); | ||
if !is_phantom { | ||
assert_eq!(src_ty, target_ty); |
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.
assert!(is_phantom || src_ty == target_ty);
5265376
to
d1f94b7
Compare
r=me with an extra test and nits addressed, should wait for the RFC before landing though |
d1f94b7
to
ff01a42
Compare
ff01a42
to
2214483
Compare
nits addressed, I think. |
Thanks! r=me, but waiting on RFC |
LGTM. You could deduplicate the check by adding an |
☔ The latest upstream changes (presumably #27551) made this pull request unmergeable. Please resolve the merge conflicts. |
superseded |
Fixes #26905
May want to wait on rust-lang/rfcs#1234
I'm not super happy with the duplicated logic in trans and typeck, and would love to know if there's a "better way". It's pretty minimal, regardless.
r? @nrc