You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can't use the turbofish with parameter impls which makes it strictly less powerful as far as I can tell. This lint should only apply to public items.
Name: impl_trait_in_param_of_pub_fn.
Category
style (or potentially pedantic)
Example
fnfoo(t:implTrait){}
Could be written as:
fnfoo<T:Trait>(t:T){}
The text was updated successfully, but these errors were encountered:
It gets more annoying when people use Option<impl Something> because then when you want to pass in None you have to say None::<Blah> which looks weird IMO. I guess those are both turbofish, so to be more precise I mean turbofish in the function generic position.
Advantage
You can't use the turbofish with parameter impls which makes it strictly less powerful as far as I can tell. This lint should only apply to public items.
Name:
impl_trait_in_param_of_pub_fn
.Category
style (or potentially pedantic)
Example
Could be written as:
The text was updated successfully, but these errors were encountered: