-
Notifications
You must be signed in to change notification settings - Fork 13.4k
The trait object Foo+Copy implements the trait Copy #32963
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
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
@arielb1 indeed. |
triage: P-high |
I am working on a fix. |
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Apr 17, 2016
Adjust example for error E0225 Adjust example for error E0225 It's using Copy as a trait object compatible trait, which is not appropriate, change to use a more typical Read + Send + Sync example. Also use whitespace around `+`. This seems appropriate apropos issue rust-lang#32963
@arielb1 saw your ping on IRC; it seems like we simply should consider |
(I've always thought that unsized types would be move-only.) |
arielb1
added a commit
to arielb1/rust
that referenced
this issue
May 3, 2016
This is required, as Copy and Sized are object-unsafe. As a soundness fix, this is a [breaking-change] Fixes rust-lang#32963
bors
added a commit
that referenced
this issue
May 6, 2016
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
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High 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.
select
considers the trait object typeFoo+Copy
to implement the traitCopy
, and therefore its supertraitsClone
andSized
. This is totally bogus, as the trait object type is not Sized.For example:
This obviously should not compile, but it does (and prints 16, because of the
size_of
unsized hack).The text was updated successfully, but these errors were encountered: