Skip to content

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

Merged
merged 2 commits into from
Jun 22, 2015

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Jun 18, 2015

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

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]
@nrc
Copy link
Member

nrc commented Jun 19, 2015

ping @rust-lang/lang because of the breaking change

@nrc
Copy link
Member

nrc commented Jun 19, 2015

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)
Copy link
Member

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

@nrc
Copy link
Member

nrc commented Jun 19, 2015

r+ for the code (modulo nit). We should discuss the breaking change aspect before landing this though

@arielb1
Copy link
Contributor Author

arielb1 commented Jun 19, 2015

@nrc

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).

@brson
Copy link
Contributor

brson commented Jun 19, 2015

Crater is started on this.

@nrc
Copy link
Member

nrc commented Jun 21, 2015

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+

@bors
Copy link
Collaborator

bors commented Jun 21, 2015

📌 Commit 5133606 has been approved by nrc

@bors
Copy link
Collaborator

bors commented Jun 22, 2015

⌛ Testing commit 5133606 with merge 31d9aee...

bors added a commit that referenced this pull request Jun 22, 2015
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
@bors bors merged commit 5133606 into rust-lang:master Jun 22, 2015
@brson
Copy link
Contributor

brson commented Jun 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants