Apply suggested change
Co-authored-by: Philipp Krones <hello@philkrones.com>
This commit is contained in:
parent
94cf90e5a5
commit
9c41822d34
@ -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.typeck_results().expr_ty(&args[0]), sym!(option_type));
|
||||
let is_result = is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(&args[0]), sym!(result_type));
|
||||
|
||||
if !is_option && !is_result {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user