Closed
Description
rustc
paniked when I tried to use GAT, I didn't know rustc
does not support it then.
Anyway I think it is not supposed to panic.
I have confirmed with
- version 1.39 on Windows, my PC
- version 1.36 on Linux. https://repl.it/repls/ImpassionedSociableSystems
fn main() {
}
trait Trait1 {
type A;
}
trait Trait2 {
type Type1<B>: Trait1<A=B>;
}
It said,
error[E0658]: generic associated types are unstable
--> src/main.rs:9:3
|
9 | type Type1<B>: Trait1<A=B>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/44265
error: internal compiler error: src\librustc\ty\subst.rs:557: type parameter `B/#1` (B/1) out of range when substituting (root type=Some(B)) substs=[Self]
thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:778:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
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.39.0 (4560ea788 2019-11-04) running on x86_64-pc-windows-msvc
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.