fix clippy::toplevel_ref_arg and ::manual_map
This commit is contained in:
parent
e6e956dade
commit
543f8bc38c
12 changed files with 42 additions and 70 deletions
|
@ -1867,15 +1867,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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue