16
submitted 1 year ago* (last edited 1 year ago) by artiman@piefed.social to c/rust@programming.dev

Why can't I open the thing it nags me about an operator but how is that relevant I'm just trying to open the thing

top 7 comments
sorted by: hot top new old
[-] syklemil@discuss.tchncs.de 9 points 1 year ago* (last edited 1 year ago)

You're missing a match after the = and before guess… on line 25.

The multiple statements on 37, 38, 39 after => also need to be enclosed in a {}.

Also, why is your error message all the way up on the top, far away from the error? Something seems misconfigured.

[-] artiman@piefed.social 7 points 1 year ago* (last edited 1 year ago)

Thank you're a lifesaver, IDK about the error message on the top didn't configure much except nord-night theme must be a bad design choice on helix's part

[-] syklemil@discuss.tchncs.de 7 points 1 year ago

fwiw if you do a cargo build you should be able to see the error messages in the correct context. If I replicate line 25 in a little test project and run cargo build I get

error: expected one of `.`, `;`, `?`, `else`, or an operator, found `{`
 --> src/main.rs:4:43
  |
4 |     let guess: u32 = guess.trim().parse() {
  |                                           ^ expected one of `.`, `;`, `?`, `else`, or an operator

error: could not compile `unacceptable-rs` (bin "unacceptable-rs") due to 1 previous error

If I try this with a blank helix config I don't get any of the text output from rust-analyzer at all, just the three dots indicating there's a problem there, so it's unlikely it's a bad design choice on helix's part.

[-] hollyberries@programming.dev 7 points 1 year ago

Inline diagnostics was implemented earlier this year, and is still not enabled by default (likely to prevent breaking existing configs). The changelog is from January of this year:

https://helix-editor.com/news/release-25-01-highlights/

You can set it up here, and is straightforward:

https://docs.helix-editor.com/editor.html#editorinline-diagnostics-section

[-] trevor@lemmy.blahaj.zone 2 points 1 year ago

As an avid Helix user, thank you for linking this! I had no idea this was available, nor that I wanted it in the first place, but now I do.

[-] TwilightKiddy@programming.dev 3 points 1 year ago* (last edited 1 year ago)

By default, the message on the top-right refers to the location of the cursor in Helix. Though, I don't see a selected line or the cursor itself, so, I'm a bit confused, too.

From the bottom right, we know there is one selection and it's on 25:48, but lack of visual indication tripped me, too.

[-] Kwdg@discuss.tchncs.de 3 points 1 year ago* (last edited 1 year ago)

You are missing a match keyword in line 25

this post was submitted on 22 Sep 2025
16 points (94.4% liked)

Rust

8378 readers
83 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS