/// ```rust
/// fn return_unit() {}
/// ```
+ #[clippy::version = "1.31.0"]
pub UNUSED_UNIT,
style,
"needless unit expression"
if_chain! {
if segments.len() == 1;
- if ["Fn", "FnMut", "FnOnce"].contains(&&*segments[0].ident.name.as_str());
+ if ["Fn", "FnMut", "FnOnce"].contains(&segments[0].ident.name.as_str());
if let Some(args) = &segments[0].args;
if let ast::GenericArgs::Parenthesized(generic_args) = &**args;
if let ast::FnRetTy::Ty(ty) = &generic_args.output;