let arith_lhs = &args[1][0];
let arith_rhs = &args[1][1];
- let ty = cx.tables().expr_ty(arith_lhs);
+ let ty = cx.typeck_results().expr_ty(arith_lhs);
if !ty.is_integral() {
return;
}
if_chain! {
if let hir::ExprKind::Call(func, args) = &expr.kind;
if args.is_empty();
- if let hir::ExprKind::Path(path) = &func.kind;
- if let hir::QPath::TypeRelative(_, segment) = path;
+ if let hir::ExprKind::Path(hir::QPath::TypeRelative(_, segment)) = &func.kind;
then {
match &*segment.ident.as_str() {
"max_value" => return Some(MinMax::Max),
}
}
- let ty = cx.tables().expr_ty(expr);
+ let ty = cx.typeck_results().expr_ty(expr);
let ty_str = ty.to_string();
// `std::T::MAX` `std::T::MIN` constants