-
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
Cleanup how we handle proto in types, remove unsound subtyping #3927
Cleanup how we handle proto in types, remove unsound subtyping #3927
Conversation
Fixes rust-lang#1896 which was never truly fixed, just masked. The given tests would have failed had they used `~fn()` and not `@fn()`. They now result in compilation errors. Fixes rust-lang#2978. Necessary first step for rust-lang#2202, rust-lang#2263.
impl Proto : to_bytes::IterBytes { | ||
pure fn iter_bytes(+lsb0: bool, f: to_bytes::Cb) { | ||
(self as uint).iter_bytes(lsb0, f); | ||
} |
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.
Very soon this will be derivable and this code can go away… but that time is not now.
This looks generally OK; it's clearly not sound yet, but seems to be going in the right direction. r+ with nits and comments addressed. |
ok, corrected nits, except that I left the use of |
let rustfmt format imports This matches the recent change in rustc. `@rust-lang/miri` what do you think?
The job Click to see the possible cause of the failure (guessed by this bot)
|
Fixes #1896 which was never truly fixed, just masked.
The given tests would have failed had they used
~fn()
andnot
@fn()
. They now result in compilation errors.Fixes #2978.
Necessary first step for #2202, #2263.
r? @pcwalton