Apply suggested change

Co-authored-by: Philipp Krones <hello@philkrones.com>
This commit is contained in:
Dániel Buga 2020-07-26 20:52:00 +02:00
parent a7083eea1c
commit 94cf90e5a5

View file

@ -2717,8 +2717,8 @@ fn lint_lazy_eval<'tcx>(
allow_variant_calls: bool,
simplify_using: &str,
) {
let is_option = is_type_diagnostic_item(cx, cx.tables.expr_ty(&args[0]), sym!(option_type));
let is_result = is_type_diagnostic_item(cx, cx.tables.expr_ty(&args[0]), sym!(result_type));
let is_option = is_type_diagnostic_item(cx, cx.tables().expr_ty(&args[0]), sym!(option_type));
let is_result = is_type_diagnostic_item(cx, cx.tables().expr_ty(&args[0]), sym!(result_type));
if !is_option && !is_result {
return;