Skip to content

nightly ICE: panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:434:8  #43924

Closed
@zhendongsu

Description

@zhendongsu
$ 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

Labels

A-associated-itemsArea: Associated items (types, constants & functions)C-bugCategory: This is a bug.F-associated_type_defaults`#![feature(associated_type_defaults)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions