to specify the type for the generic parameter. Here a few examples of common usage of this syntax. Divided into four sections.
Will tell you what's the size of u8 in bytes. It's kind of amazing that you can use generic in this way.
Take a note that we put the turbofish after the Vec, not the new method. Since the ones that generic is the struct, not the method. Bear with me for this one, since it's still follow the rule of thumb above.
And yes, you can do this to all rust collections. See HashSet for another example. Below we create a new HashSet with 10 capacity.
Still, it all follows the rule of thumb above.
It's a nice thing to have this syntax, but remember, you can always bind the value to a variable using the let syntax and declare the type explicitly. For an alternative, there's also a feature in nightly that combine the best of those two world. See the type ascription tracking issue for details.