Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid slice reference syntax causes Rust language server to crash 🦀 #15437

Closed
pcgeek86 opened this issue Aug 11, 2023 · 0 comments · Fixed by #15438
Closed

Invalid slice reference syntax causes Rust language server to crash 🦀 #15437

pcgeek86 opened this issue Aug 11, 2023 · 0 comments · Fixed by #15438
Assignees
Labels
C-bug Category: bug

Comments

@pcgeek86
Copy link

Summary

When specifying an invalid syntax for Rust slices, the Rust Analyze Language Server repeatedly crashes.

Specifically, this bit of code seems to consistently cause crashes:

println!("{:?}", &myages[0 2]);

Notice how the &myages[0 2] uses incorrect syntax to create a slice from an array.

image

Expected Result

Rust Analyzer catches the syntax error and reports it accordingly.

Actual Result

Rust Language Server repeatedly crashes.

[Info  - 2:43:24 AM] Connection to server got closed. Server will restart.
true
[Info  - 2:43:30 AM] Connection to server got closed. Server will restart.
true
[Info  - 2:43:36 AM] Connection to server got closed. Server will restart.
true
[Info  - 2:43:42 AM] Connection to server got closed. Server will restart.
true
[Error - 2:43:48 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.

Details

rust-analyzer version: rust-analyzer version: 0.3.1615-standalone

rustc version: rustc 1.71.1 (eb26296b5 2023-08-03)

relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)

VSCode 1.81.0
Windows 11 Client
Remote SSH Extension
Remote SSH Host: Ubuntu Linux Server 22.04 LTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants