-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE using associated type from higher ranked trait #70120
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-codegen
Area: Code generation
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
|
I think this falls under bucket issue #62529 |
Encountered this while working on a callback taking a capnproto builder: Simplified code// the proto is just: struct Whoops { boing @0 :Bool; }
pub mod schemas_capnp {
include!(concat!(env!("OUT_DIR"), "/schemas_capnp.rs"));
}
fn fancy_serialize<
Own: for<'a> capnp::traits::Owned<'a>,
F: Fn(&mut <Own as capnp::traits::Owned<'_>>::Builder),
>(
cb: F,
) -> Vec<u8> {
let mut builder = capnp::message::Builder::new_default();
{
let mut root = builder.init_root();
cb(&mut root);
}
capnp::serialize::write_message_to_words(&builder)
}
fn main() {
fancy_serialize::<schemas_capnp::whoops::Owned, _>(|root| root.set_boing(true));
} |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-codegen
Area: Code generation
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Apologies if this is already reported somewhere; couldn't find it during a quick search.
Getting an internal compiler error for this code (playground):
The error reads:
Tested in
1.42.0
,1.43.0-beta.1
, and1.44.0-nightly (2020-03-17 7ceebd98c6a15ae30e77)
The text was updated successfully, but these errors were encountered: