Incorrect compilation/ICE using default associated type with specialization #59435
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-specialization
Area: Trait impl specialization
A-type-system
Area: Type system
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-specialization
`#![feature(specialization)]`
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
With specialization, it is possible to define a default associated type that does not fulfill its trait bounds. Here is a minimal example, that surely should not compile, but does with rustc 1.35.0-nightly:
Unsurprisingly, adding the main function
causes an ICE. Error message and backtrace (compiled at the playground):
The text was updated successfully, but these errors were encountered: