mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
Fix dogfood filter-map
This commit is contained in:
parent
2551bd8924
commit
1b4aba47b7
@ -184,16 +184,18 @@ fn check_ty(cx: &LateContext, ast_ty: &hir::Ty, is_local: bool) {
|
||||
check_ty(cx, ty, is_local);
|
||||
for ty in p.segments
|
||||
.iter()
|
||||
.filter_map(|seg| seg.parameters.as_ref())
|
||||
.flat_map(|params| params.types.iter())
|
||||
.flat_map(|seg| seg.parameters.as_ref()
|
||||
.map_or_else(|| [].iter(),
|
||||
|params| params.types.iter()))
|
||||
{
|
||||
check_ty(cx, ty, is_local);
|
||||
}
|
||||
},
|
||||
QPath::Resolved(None, ref p) => for ty in p.segments
|
||||
.iter()
|
||||
.filter_map(|seg| seg.parameters.as_ref())
|
||||
.flat_map(|params| params.types.iter())
|
||||
.flat_map(|seg| seg.parameters.as_ref()
|
||||
.map_or_else(|| [].iter(),
|
||||
|params| params.types.iter()))
|
||||
{
|
||||
check_ty(cx, ty, is_local);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user