@rust @learningrustandlemmy I might have missed some subtle syntactical difference here, I guess aas in Vec<...> is a type definition, and Vec::<...> is referring to the struct itself, but with a type parameter given. context - https://www.reddit.com/r/learnrust/comments/exmqyc/what_are_the_rules_for_turbofish/
Vec<...>
Vec::<...>
@BB_C disclaimer - no llm , I am following a book
#rust folks it's supposed to throw this error without lazy_static crate , but it doesn't? https://git.sr.ht//~carnotweat/morning-rust/tree/main/item/sum.rs#L14 cc @rust @learningrustandlemmy
lazy_static
@rust @learningrustandlemmy
I might have missed some subtle syntactical difference here, I guess
aas in
Vec<...>is a type definition, andVec::<...>is referring to the struct itself, but with a type parameter given.context - https://www.reddit.com/r/learnrust/comments/exmqyc/what_are_the_rules_for_turbofish/