diff options
| author | flip1995 <philipp.krones@embecosm.com> | 2021-04-08 17:50:13 +0200 |
|---|---|---|
| committer | flip1995 <philipp.krones@embecosm.com> | 2021-04-08 17:50:13 +0200 |
| commit | f6d1f368db9e726fde825dc2525cdec07673b416 (patch) | |
| tree | 3528a2e5d9d2c22732db72815ce4e121b157bfb9 /clippy_lints/src/default_numeric_fallback.rs | |
| parent | cde58f7174cd83752b3c0a00a970dcc07c511077 (diff) | |
| download | rust-f6d1f368db9e726fde825dc2525cdec07673b416.tar.gz rust-f6d1f368db9e726fde825dc2525cdec07673b416.zip | |
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
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 73f71d88b05..6e883942680 100644 --- a/clippy_lints/src/default_numeric_fallback.rs +++ b/clippy_lints/src/default_numeric_fallback.rs @@ -131,8 +131,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(); |
