-
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
ICE when trying to parameterize on ebml::writer::Encoder #11881
Comments
still reproduces. updated description to put in something that builds against |
This no longer produces an ICE likely due to #13157 and related work towards resolving the outstanding #5121. The updated version in the description no longer builds against master due to changes in the libserialize API, so I have updated it again here: https://gist.github.com/JustAPerson/a96dddcde35633ec9d27 --- old.rs 2014-03-30 20:40:18.290040065 -0500
+++ new.rs 2014-03-30 20:47:11.096850380 -0500
@@ -26 +26 @@
-fn encode_json<'a, T: Encodable<json::Encoder<'a>>>(val: &T, wr: &'a mut MemWriter) {
+fn encode_json<'a, T: Encodable<json::Encoder<'a>, std::io::IoError>>(val: &T, wr: &'a mut MemWriter) {
@@ -30 +30 @@
-fn encode_ebml<'a, T: Encodable<writer::Encoder<'a>>>(val: &T, wr: &'a mut MemWriter) {
+fn encode_ebml<'a, T: Encodable<writer::Encoder<'a, MemWriter>, std::io::IoError>>(val: &T, wr: &'a mut MemWriter) { Tested with
|
Flagging as needstest |
Closes rust-lang#13394 (sync: remove unsafe and add Send+Share to Deref (enabled by autoderef vtables)) Closes rust-lang#13389 (Made libflate functions return Options instead of outright failing) Closes rust-lang#13388 (doc: Document flavorful variations of paths) Closes rust-lang#13387 (Register new snapshots) Closes rust-lang#13386 (std: Add more docs for ptr mod) Closes rust-lang#13384 (Tweak crate loading to load less metadata) Closes rust-lang#13382 (fix ~ZeroSizeType rvalues) Closes rust-lang#13378 (Update tidy script, replace XXX with FIXME) Closes rust-lang#13377 (std: User a smaller stdin buffer on windows) Closes rust-lang#13369 (Fix spelling errors in comments.) Closes rust-lang#13314 (Made 'make install' include libs for additional targets) Closes rust-lang#13278 (std: make vec!() macro handle a trailing comma) Closes rust-lang#13276 (Add test for rust-lang#11881)
[`implied_bounds_in_impls`]: avoid linting on overlapping associated tys Fixes rust-lang#11880 Before this change, we were simply ignoring associated types (except for suggestion purposes), because of an incorrect assumption (see the comment that I also removed). For something like ```rs trait X { type T; } trait Y: X { type T; } // Can't constrain `X::T` through `Y` fn f() -> impl X<T = i32> + Y<T = u32> { ... } ``` We now avoid linting if the implied bound (`X<T = i32>`) "names" associated types that also exists in the implying trait (`trait Y`). Here that would be the case. But if we only wrote `impl X + Y<T = u32>` then that's ok because `X::T` was never constrained in the first place. I haven't really thought about how this interacts with GATs, but I think it's fine. Fine as in, it might create false negatives, but hopefully no false positives. (The diff is slightly annoying because of formatting things. Really the only thing that changed in the if chain is extracting the `implied_by_def_id` which is needed for getting associated types from the trait, and of course actually checking for overlap) cc `@Jarcho` ? idk if you want to review this or not. I assume you looked into this code a bit to find this bug. changelog: [`implied_bounds_in_impls`]: avoid linting when associated type from supertrait can't be constrained through the implying trait bound
(pnkfelix: Here is a modern example that ICE's (feel free to replace as necessary as
rustc
changes):)Original bug description follows
Consider the following:
This fails with the following ICE:
But if you comment out the EBML code, like so:
it compiles.
The JSON and EBML serialization code is identifical, but their Encoder impls and how they're exposed are slightly different (I assume because of their respective histories). Something about that difference is triggering this ICE, it seems.
The text was updated successfully, but these errors were encountered: