diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-03-30 14:59:59 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2021-03-31 14:06:27 -0500 |
| commit | 827d6aaad4a7ec24dd3191160cefe0c1e0b654b9 (patch) | |
| tree | 4134e62173b1d077f44e784f4f1091368d3106a5 /clippy_lints/src/default_numeric_fallback.rs | |
| parent | 5f887d09b87d7c6a9c3a4f6afa62a20847dd2509 (diff) | |
| download | rust-827d6aaad4a7ec24dd3191160cefe0c1e0b654b9.tar.gz rust-827d6aaad4a7ec24dd3191160cefe0c1e0b654b9.zip | |
Eat dogfood
Diffstat (limited to 'clippy_lints/src/default_numeric_fallback.rs')
| -rw-r--r-- | clippy_lints/src/default_numeric_fallback.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/default_numeric_fallback.rs b/clippy_lints/src/default_numeric_fallback.rs index d136db9373c..42bafc3442e 100644 --- a/clippy_lints/src/default_numeric_fallback.rs +++ b/clippy_lints/src/default_numeric_fallback.rs @@ -130,8 +130,8 @@ impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> { }, ExprKind::Struct(_, fields, base) => { + let ty = self.cx.typeck_results().expr_ty(expr); if_chain! { - let ty = self.cx.typeck_results().expr_ty(expr); if let Some(adt_def) = ty.ty_adt_def(); if adt_def.is_struct(); if let Some(variant) = adt_def.variants.iter().next(); |
