1
Fork 0

Rollup merge of #110404 - matthiaskrgr:mapmap, r=Nilstrieb

fix clippy::toplevel_ref_arg and ::manual_map

r? ``@Nilstrieb``
This commit is contained in:
Matthias Krüger 2023-04-17 08:09:40 +02:00 committed by GitHub
commit 1795bf8222
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 42 additions and 70 deletions

View file

@ -1869,15 +1869,13 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
Some(LexicalScopeBinding::Item(name_binding)) => Some(name_binding.span),
_ => None,
};
let suggestion = if let Some(span) = match_span {
Some((
let suggestion = match_span.map(|span| {
(
vec![(span, String::from(""))],
format!("`{}` is defined here, but is not a type", ident),
Applicability::MaybeIncorrect,
))
} else {
None
};
)
});
(format!("use of undeclared type `{}`", ident), suggestion)
} else {