-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Prohibit casts between fat pointers to different traits #26394
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
Conversation
This makes them compliant with the new version of RFC 401 (i.e. RFC 1052). Fixes rust-lang#26391. I *hope* the tests I have are enough. This is a [breaking-change]
ping @rust-lang/lang because of the breaking change |
Also cc @brson to see if we can test this on crater |
@@ -99,6 +99,12 @@ fn main() | |||
let l_via_str = unsafe{&*(s as *const [u8])}; | |||
assert_eq!(&l, l_via_str); | |||
|
|||
// ptr-ptr-cast (both vk=Length, check length is preserved) |
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.
nit: spell out vk in this comment
r+ for the code (modulo nit). We should discuss the breaking change aspect before landing this though |
addressed. I think the breaking change was part of the RFC (this is a 1.2 -> 1.2 breaking change, the code ICE-d before). |
Crater is started on this. |
Since this is only a breaking change within a version, I think it is OK to land. If Crater finds anything horrible some how, we can back out. @bors: r+ |
📌 Commit 5133606 has been approved by |
This makes them compliant with the new version of RFC 401 (i.e.
RFC 1052).
Fixes #26391. I hope the tests I have are enough.
This is a [breaking-change]
r? @nrc