about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarcin Serwin <toxyxer@gmail.com>2020-03-17 09:03:36 +0100
committerMarcin Serwin <toxyxer@gmail.com>2020-04-09 08:05:51 +0200
commit03f584c0c7b14d6f6effbe0b9e6b4fb00be57fbd (patch)
tree7b2a43db08959218b80f298ca153f13491b4be64
parent0d00eafd3297cfd67a1af3ff053bab8ef5f1ca12 (diff)
downloadrust-03f584c0c7b14d6f6effbe0b9e6b4fb00be57fbd.tar.gz
rust-03f584c0c7b14d6f6effbe0b9e6b4fb00be57fbd.zip
Update field names in is_float
-rw-r--r--clippy_lints/src/misc.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/misc.rs b/clippy_lints/src/misc.rs
index 2c451526023..d4a74a6b451 100644
--- a/clippy_lints/src/misc.rs
+++ b/clippy_lints/src/misc.rs
@@ -498,11 +498,11 @@ fn is_signum(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
     false
 }
 
-fn is_float(cx: &LateContext<'_, '_>, expr: &Expr) -> bool {
-    let value = &walk_ptrs_ty(cx.tables.expr_ty(expr)).sty;
+fn is_float(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
+    let value = &walk_ptrs_ty(cx.tables.expr_ty(expr)).kind;
 
     if let ty::Array(arr_ty, _) = value {
-        return matches!(arr_ty.sty, ty::Float(_));
+        return matches!(arr_ty.kind, ty::Float(_));
     };
 
     matches!(value, ty::Float(_))