You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, the assoc_predicates for a type are defined in the local crate (it's libcore, and the associated predicate is ?Sized), so the lookup_trait_def assertion trips.
The text was updated successfully, but these errors were encountered:
jdm
added
the
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
label
Feb 11, 2015
…bug).
The issue is that the Repr logic assumes that any trait_defs to
be represented will be non-local. This will not be the case when
compiling libcore: the compiler has a default predicate on many
types that they will be Sized, and the Sized trait is defined
in libcore.
If we allow that a Repr'ed trait_def must come from a foreign
crate, then, because the Repr logic can be used while the
trait_defs table is being built, there will be a chance that
a trait_def lookup will fail on Repr.
Handle both of these issues by defining a new try_lookup_trait_def
for use by the Repr logic that will attempt to look up a trait_def
in the local crate, and returns success/failure in an Option<>.
Callers are then responsible for making sure the trait_def is
actually present in defining the representation.
build command:
output tail:
I isolated the problem to this line in librustc_typeck/collect.rs:
In this case, the assoc_predicates for a type are defined in the local crate (it's libcore, and the associated predicate is
?Sized
), so thelookup_trait_def
assertion trips.The text was updated successfully, but these errors were encountered: