-
Notifications
You must be signed in to change notification settings - Fork 13.4k
error: the trait core::marker::Sized
is not implemented for the type std::error::Error + Sized + 'static
#33201
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
Comments
Full error message:
|
So actually the error is that I have a Trait object that's not behind a pointer (Box or ref). As a result it's not sized even though I use |
The |
duplicate of #33243. |
Short-cut `T: Sized` trait selection for ADTs Basically avoids all nested obligations when checking whether an ADT is sized - this speeds up typeck by ~15% The refactoring fixed #32963, but I also want to make `Copy` not object-safe (will commit that soon). Fixes #33201 r? @nikomatsakis
@julienw can you share the example with the solution? |
I described it at the end of my initial description, but here is the full code for the solution |
Uh oh!
There was an error while loading. Please reload this page.
The error is not easy to understand for this code:
(it's also in https://play.rust-lang.org/?gist=ec4209f420275037c3f652a7aeae01ff&version=stable&mode=debug)
If I understand properly, the issue is that I should have something like this instead:
But the error is very misleading.
The text was updated successfully, but these errors were encountered: