1
Fork 0

Add FIXME as reminder to restore suggestion later

This commit is contained in:
Michael Goulet 2023-08-05 17:04:30 -07:00 committed by GitHub
parent b71f2becb2
commit 3b3e466e36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -578,6 +578,7 @@ fn lint_nan<'tcx>(
r: &hir::Expr<'_>,
f: impl FnOnce(Span, Span) -> InvalidNanComparisonsSuggestion,
) -> InvalidNanComparisons {
// FIXME(#72505): This suggestion can be restored if `f{32,64}::is_nan` is made const.
let suggestion = (!cx.tcx.hir().is_inside_const_context(e.hir_id)).then(|| {
if let Some(l_span) = l.span.find_ancestor_inside(e.span) &&
let Some(r_span) = r.span.find_ancestor_inside(e.span)