Rust-analyzer output: meaning of the terms inside parentheses

I've updated my nvim setup to include the latest lsp services. I'm using rust-analyzer. I'm used to seeing the type value tagged at the end of a line of code (using what I believe is called "virtual text"). I now see the following:

In particular, what is input in the following:

(input) Cow<str>

Another example,

(svc, path) MethodRouter<{unknown}, Error>

Thanks in advance!

- E

I don't use nvim, but I believe the part in the parentheses are the parameter name hints, that is input is the name of the parameter for percent_decode.

Similar for the second example(albeit more confusing here) svc is the parameter name of get_service while path is the one of the new function.

Thank you. That makes complete sense. It's cold where I am and I was out shoveling the walk. My brain may have slowed down due to the cold :))

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.