Open antonilol opened 2 hours ago
I tried this code:
trait What { type This<'a>: 'a where for<'b> Self::This<'b>: 'a + 'b; } impl<T> What for T { type This<'a> = T where T: 'a; }
I expected to see this happen: The compiler returning with a success (probably not) or a compilation error
Instead, this happened: Compiler freezes, cpu usage shows one core of 100% usage (infinite loop?)
rustc --version --verbose:
rustc --version --verbose
rustc 1.81.0 (eeb90cda1 2024-09-04) binary: rustc commit-hash: eeb90cda1969383f56a2637cbd3037bdf598841c commit-date: 2024-09-04 host: x86_64-unknown-linux-gnu release: 1.81.0 LLVM version: 18.1.7
I tried some versions between GATs stabilizing and current nightly, and all had the same behavior.
This could be a duplicate of existing similar issues, but I am not sure if that is the case.
The next-gen solver currently fails with error: cannot normalize `for<'b> <T as What>::This<'b>: 'b` instead of hanging.
error: cannot normalize `for<'b> <T as What>::This<'b>: 'b`
I tried this code:
I expected to see this happen: The compiler returning with a success (probably not) or a compilation error
Instead, this happened: Compiler freezes, cpu usage shows one core of 100% usage (infinite loop?)
Meta
rustc --version --verbose
:I tried some versions between GATs stabilizing and current nightly, and all had the same behavior.
This could be a duplicate of existing similar issues, but I am not sure if that is the case.