GAT impl with type parameter causes ICE, even without feature enabled #64755
Labels
A-GATs
Area: Generic associated types (GATs)
C-bug
Category: This is a bug.
F-generic_associated_types
`#![feature(generic_associated_types)]` a.k.a. GATs
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This also applies to stable rust, since it still ICEs without the feature gate, though of course on stable there's no way to encounter it without having another error due to the feature not being enabled. It's similar to #60654 but with type parameters instead of lifetime parameters. Here's an example (playground link):
This is a bit easier to encounter than that example shows, since type cohesion isn't checked for GATs yet, meaning that you can reproduce this by implementing the normal Iterator trait but still placing a type parameter on the Item type (note for whoever implements that: almost all of the code in rustc_typeck::check::compare_method is reusable there).
The text was updated successfully, but these errors were encountered: