))
})
},
- ExprKind::MethodCall(path, _, args) if args.len() == 1 => {
- let type_of_receiver = cx.tables.expr_ty(&args[0]);
+ ExprKind::MethodCall(path, _, args, _) if args.len() == 1 => {
+ let type_of_receiver = cx.tables().expr_ty(&args[0]);
if !is_type_diagnostic_item(cx, type_of_receiver, sym!(option_type))
&& !is_type_diagnostic_item(cx, type_of_receiver, sym!(result_type))
{
self.bool_expr(e)
},
ExprKind::Unary(UnOp::UnNot, inner) => {
- if self.cx.tables.node_types()[inner.hir_id].is_bool() {
+ if self.cx.tables().node_types()[inner.hir_id].is_bool() {
self.bool_expr(e);
} else {
walk_expr(self, e);
}
fn implements_ord<'a, 'tcx>(cx: &'a LateContext<'a, 'tcx>, expr: &Expr<'_>) -> bool {
- let ty = cx.tables.expr_ty(expr);
+ let ty = cx.tables().expr_ty(expr);
get_trait_def_id(cx, &paths::ORD).map_or(false, |id| implements_trait(cx, ty, id, &[]))
}