-
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
ICE: "Unexpected tail in unsized_info_ty" when using impl Trait #37096
Comments
I assume this is (once again) a duplicate of #16812. |
Sorry for the duplicate, I did a quick search on (open) issues with pieces of the error message and it didn't bring anything ... However, all issues linked with #16812 look related to unsized types. Are I edited the example to remove the |
I'm not sure where the the unsized type comes from, however the And don't worry too much about the duplicate, it's great that you did search for open issues and it also gives a bit of a feel for how often certain issues occur. |
I just ran into this exact ICE again with futures-rs, with If it can help, I did get another ICE when I try to box the It might be related to #35988, but it might be worth noting since it can be triggered on fn test_pooled_emit() {
let mut emitter = PooledEventEmitter::new();
emitter.add_listener("test", box || {
thread::sleep_ms(1000);
println!("Thread: {}", thread_id::get());
Ok(())
}).unwrap();
emitter.add_listener_value::<i32, _>("test", box |arg| {
println!("Thread: {}, {:?}", thread_id::get(), arg);
Ok(())
}).unwrap();
emitter.add_listener_value::<&str, _>("test", box |arg| {
println!("Thread: {}, {:?}", thread_id::get(), arg);
Ok(())
}).unwrap();
let a = box emitter.emit("test");
let b = box emitter.emit_value("test", 10);
let c = box emitter.emit_value("test", "test");
let all = box a.join3(b, c);
assert_eq!(all.wait().unwrap(), (3, 3, 3));
} I can't replicate it with something simpler so far, but here is the error generated from the above code:
Here is the backtrace:
|
I refactored my code to remove a locally defined function with its own |
This has been fixed. |
I was using
impl Trait
and thefutures
library when I got an ICE. I managed to reduce it to the following example:edit: Updated example
It happened on a ~week-old nightly version, and then on the latest version.
The text was updated successfully, but these errors were encountered: