diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-01 16:00:08 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-12 17:54:49 +0100 |
| commit | 34d91709b672d91ea9623ae4bc2275e8b003fc2c (patch) | |
| tree | 9b7b2c12d75a6ff4e8e9af725c778b09d1bba319 /src/librustc_save_analysis | |
| parent | 404013e015d9a9f4835cda47e56aab5223f278ed (diff) | |
| download | rust-34d91709b672d91ea9623ae4bc2275e8b003fc2c.tar.gz rust-34d91709b672d91ea9623ae4bc2275e8b003fc2c.zip | |
parse: refactor fun ret ty & param ty
Diffstat (limited to 'src/librustc_save_analysis')
| -rw-r--r-- | src/librustc_save_analysis/dump_visitor.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/librustc_save_analysis/dump_visitor.rs b/src/librustc_save_analysis/dump_visitor.rs index d63a9df8d9b..cc0f3c512f5 100644 --- a/src/librustc_save_analysis/dump_visitor.rs +++ b/src/librustc_save_analysis/dump_visitor.rs @@ -811,9 +811,8 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> { match **generic_args { ast::GenericArgs::AngleBracketed(ref data) => { for arg in &data.args { - match arg { - ast::GenericArg::Type(ty) => self.visit_ty(ty), - _ => {} + if let ast::GenericArg::Type(ty) = arg { + self.visit_ty(ty); } } } @@ -821,8 +820,8 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> { for t in &data.inputs { self.visit_ty(t); } - if let Some(ref t) = data.output { - self.visit_ty(t); + if let ast::FunctionRetTy::Ty(ty) = &data.output { + self.visit_ty(ty); } } } |
