We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b71f2be commit 3b3e466Copy full SHA for 3b3e466
compiler/rustc_lint/src/types.rs
@@ -578,6 +578,7 @@ fn lint_nan<'tcx>(
578
r: &hir::Expr<'_>,
579
f: impl FnOnce(Span, Span) -> InvalidNanComparisonsSuggestion,
580
) -> InvalidNanComparisons {
581
+ // FIXME(#72505): This suggestion can be restored if `f{32,64}::is_nan` is made const.
582
let suggestion = (!cx.tcx.hir().is_inside_const_context(e.hir_id)).then(|| {
583
if let Some(l_span) = l.span.find_ancestor_inside(e.span) &&
584
let Some(r_span) = r.span.find_ancestor_inside(e.span)
0 commit comments