Highlight related line

I was watching fasterthanlime's video about self-referential structs, and he had this bit of code
You can see the error it has. The error is on line 5 and mentions like 17. You can get something similar with other things, like trying to use a variable after a function takes ownership of it.

My question is, how'd he get his editor (VS Code) to also highlight line 17? Mine will highlight line 5 fine, but not line 17.

Could be the "Error Lens" extension, though I'm not sure at all.

Error Lens is what turns Rust Analyzer's squiggle into the much more visible thing, but the- ok hold on one second...

Ok, I figured it out. I needed to add "hint" to this Error Lens setting

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.