rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Stack overflow when calling "impl Fn(&impl Trait)"

Open Philip-Trettner opened this issue 8 months ago • 2 comments

rust-analyzer version: rust-analyzer version: 0.3.2011-standalone

rustc version: rustc 1.79.0 (129f3b996 2024-06-10)

editor or extension: VSCode rust-analyzer v0.3.2011

code snippet to reproduce:

trait Foo { }
struct SFoo;
impl Foo for SFoo { }

fn test(f: impl Fn(&impl Foo)) {
    let foo = SFoo {};
    f(&foo);
}

I'm getting:

thread 'Worker' has overflowed its stack fatal runtime error: stack overflow

Then the extension restarts and crashes again.

Philip-Trettner avatar Jun 26 '24 16:06 Philip-Trettner