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
rust-analyzer version: v0.3.1958 and others before (and also prelease)
rustc version: rustc 1.78.0 (9b00956e5 2024-04-29) and any other versions.
code snippet to reproduce:
use std::fmt::Display;fnprints_it_impl_trait(input:implDisplay){println!("You can print many things, including {input}");}fnprints_it_regular_generic<T:Display>(input:T){println!("You can print many things, including {input}");}fnmain(){prints_it_regular_generic::<u8>(100);prints_it_impl_trait(100);prints_it_impl_trait(100u8);// prints_it_impl_trait::<u8>(100);gives_higher(8,10);}fngives_higher(one:implPartialOrd + Display,two:implPartialOrd + Display){let higher = if one > two { one }else{ two };println!("{higher} is higher.");}
When the above code is included in my project, Rust Analyzer crashes with a stack overflow error. Removing the gives_higher function resolves the issue.
Also commenting out the gives_higher function prevents the crash, suggesting the issue lies within the handling of impl Trait with PartialOrd + Display in this context. Within the 3 minutes it consistently restarts the server for all dependencies.
Logs:
thread 'Worker' has overflowed its stack
thread 'Worker' has overflowed its stack
thread 'Worker' has overflowed its stack
[Info - 11:12:05 AM] Connection to server got closed. Server will restart.
true
thread 'Worker' has overflowed its stack
[Info - 11:12:30 AM] Connection to server got closed. Server will restart.
true
.... and so on and then:
thread 'Worker' has overflowed its stack
[Error - 11:15:30 AM] The Rust Analyzer Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
The text was updated successfully, but these errors were encountered:
rust-analyzer version: v0.3.1958 and others before (and also prelease)
rustc version: rustc 1.78.0 (9b00956e5 2024-04-29) and any other versions.
code snippet to reproduce:
When the above code is included in my project, Rust Analyzer crashes with a stack overflow error. Removing the gives_higher function resolves the issue.
Also commenting out the gives_higher function prevents the crash, suggesting the issue lies within the handling of impl Trait with PartialOrd + Display in this context. Within the 3 minutes it consistently restarts the server for all dependencies.
Logs:
thread 'Worker' has overflowed its stack
thread 'Worker' has overflowed its stack
thread 'Worker' has overflowed its stack
[Info - 11:12:05 AM] Connection to server got closed. Server will restart.
true
thread 'Worker' has overflowed its stack
[Info - 11:12:30 AM] Connection to server got closed. Server will restart.
true
.... and so on and then:
thread 'Worker' has overflowed its stack
[Error - 11:15:30 AM] The Rust Analyzer Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
The text was updated successfully, but these errors were encountered: