diff options
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 0ffc9d09355..5e537d7b95c 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -658,13 +658,13 @@ impl<'a> Parser<'a> { &self, gen_arg: GenericArg, ) -> Result<(Ident, Option<GenericArgs>), GenericArg> { - if let GenericArg::Type(ty) = &gen_arg { - if let ast::TyKind::Path(qself, path) = &ty.kind { - if qself.is_none() && path.segments.len() == 1 { - let seg = &path.segments[0]; - return Ok((seg.ident, seg.args.as_deref().cloned())); - } - } + if let GenericArg::Type(ty) = &gen_arg + && let ast::TyKind::Path(qself, path) = &ty.kind + && qself.is_none() + && path.segments.len() == 1 + { + let seg = &path.segments[0]; + return Ok((seg.ident, seg.args.as_deref().cloned())); } Err(gen_arg) } |
