Closed
Description
$ rustc-nightly --version
rustc 1.21.0-nightly (f25c2283b 2017-08-15)
$
$ rustc-nightly tmp.rs
error: internal compiler error: /checkout/src/librustc/traits/trans/mod.rs:75: Encountered error `Unimplemented` selecting `Binder(<std::string::ToString as std::default::Default>)` during trans
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.21.0-nightly (f25c2283b 2017-08-15) running on i686-unknown-linux-gnu
thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:434:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.
$
$ cat tmp.rs
#![feature(associated_type_defaults)]
trait Foo < T : Default + ToString >
{
type Out : Default + ToString = ToString;
}
impl Foo < u32 > for () {}
impl Foo < u64 > for () {}
fn main ()
{
assert_eq ! (< () as Foo < u32 >> :: Out :: default().to_string(), "false");
}
$
Metadata
Metadata
Assignees
Labels
Area: Associated items (types, constants & functions)Category: This is a bug.`#![feature(associated_type_defaults)]`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.