Sorry if this was a dup topic. I do not know what is the official name of <> around a type.
My problem is that, my vscode + rust ayalyzer env, show matching symbol of {}, [] and (). By which I meant, when I place the cursor on one of the matching symbols, the other one shows in special color or something to let me know where it is. But with <> (typically used like collect::<Vec<_>>(), vscode does not do anything.
The less than and greather than symbols (<>) in Rust are used for generics (both for setting generic type parameters and for providing such generic type arguments).
When you use the underscore as an argument for a generic type parameter, you're telling the compiler to infer it.
As a workaround for getting the type information in such cases, you can bind the expression to a variable:
I think the OP is just asking about matching bracket functionality. Because <> are overloaded to signify both comparison operators and angle brackets, VSCode doesn’t by default consider them brackets. Figuring out whether a < or > is used as a bracket or operator requires more involved parsing than with other bracket types; it’s notoriously difficult in C++’s case, somewhat easier with Rust but still requires quite deep understanding of the language grammar. I don’t know whether VSCode exposes any way to customize matching bracket highlighting, but I wouldn’t be surprised if it doesn’t.