Closed
Description
At least to my understanding, this bug is caused by using the specialization feature with a trait while using an associated type of a possibly unfullfilled trait in one of the impl
's.
I tried this code:
#![feature(specialization)]
pub trait Trait<T> { }
default impl<T, U> Trait<T> for U { }
impl<T> Trait<<T as Iterator>::Item> for T { }
fn main() { }
I expected to see this happen: An error because T is not necessarily an Iterator
Instead, this happened: rustc
just panics
Meta
rustc --version --verbose
:
rustc 1.23.0-nightly (d762b1d6c 2017-11-04)
binary: rustc
commit-hash: d762b1d6c67db12e117186d94d70e46cddb22965
commit-date: 2017-11-04
host: x86_64-unknown-linux-gnu
release: 1.23.0-nightly
LLVM version: 4.0
Backtrace:
Quite large, I put it in a file for that reason (56 steps):
backtrace.txt
Metadata
Metadata
Assignees
Labels
Area: Trait impl specializationCategory: This is a bug.`#![feature(specialization)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.This issue requires a nightly compiler in some way.