-
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
complete default methods for traits #2794
Comments
fc9c4c3 is the beginning of support for default methods in traits. |
Default methods get through typeck as of 293f371. |
Per IRC discussions, it seems that a big part of the remaining work (possibly the big part) is monomorphization. This is now @msullivan's bug, since I'm back at school and, alas, unlikely to work on it any time soon, and he's better equipped to deal with it than I am. :) |
One specific thing that's not finished is that default methods don't work cross-crate. |
Default methods are important for Servo (layout, display list). I will deliver a Free Beverage to whomever fixes this (two beverages if documentation written!). |
It would be very useful to have a "compiler_context" trait or some such that looks kind of like:
|
This is basically blocked and/or possibly a subpart of #3446 |
Deferring to 0.5 |
I think this is done; file more specific bugs if necessary. |
Huzzah! |
@lkuper I spoke a bit too soon, but still, there will be separate more specific bugs for any remaining issues :-) |
@msullivan - where does this stand for 0.7? |
Bumping from 0.7 |
@catamorphism - They are a lot more solid than they used to be, and could /maybe/ be taken out from behind the flag. Still a bunch of known problems, though. |
This is basically done and working. Couple minor problems, but they are solidly usable. |
Serious round of applause for @msullivan and everyone else who's been working on this over the last year. |
… also include ZSTs (rust-lang#2794) This change considers another case for the code generation of scalar data. In particular, when the expected type is an ADT, we previously considered two cases: either there is no field or there is one. But in cases where the ADT includes a ZST, the ADT will contain multiple fields: one associated to the scalar data, and other fields associated to the ZSTs. In those cases, we ended up crashing as in rust-lang#2680: ```rust error: internal compiler error: Kani unexpectedly panicked at panicked at cprover_bindings/src/goto_program/expr.rs:804:9: assertion failed: `(left == right)` left: `2`, right: `1`: Error in struct_expr; mismatch in number of fields and values. StructTag("tag-_161424092592971241517604180463813633314") [Expr { value: IntConstant(0), typ: Unsignedbv { width: 8 }, location: None, size_of_annotation: None }]. thread 'rustc' panicked at cprover_bindings/src/goto_program/expr.rs:804:9: assertion failed: `(left == right)` left: `2`, right: `1`: Error in struct_expr; mismatch in number of fields and values. StructTag("tag-_161424092592971241517604180463813633314") [Expr { value: IntConstant(0), typ: Unsignedbv { width: 8 }, location: None, size_of_annotation: None }] ``` With the changes in this PR, that's no longer the case. Resolves rust-lang#2364 Resolves rust-lang#2680
Implement the first two parts of this proposal (the third part, dealing with instance coherence, is orthogonal).
The text was updated successfully, but these errors were encountered: