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
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: the compiler hit an unexpected failure path. this is a bug
task 'rustc' failed at 'assertion failed: !ty::type_has_params(t)', /var/tmp/portage/dev-lang/rust-9999/work/rust-9999/src/librustc/middle/trans/common.rs:826
The text was updated successfully, but these errors were encountered:
Sadly, the issue is not with phantom types, but it seems I forgot to substitute type params in defaults for other type params:
#[feature(default_type_params)];structFoo<T>(T);structBar<T,U = Foo<T>>(T,U);fnmain(){let _:Bar<bool> = Bar(true,Foo(false));}// error: mismatched types: expected `Bar<bool>` but found `Bar<bool,Foo<bool>>` (expected type parameter but found bool)
Code:
Output:
The text was updated successfully, but these errors were encountered: