Skip to content

Commit

Permalink
Add FIXME as reminder to restore suggestion later
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors authored Aug 6, 2023
1 parent b71f2be commit 3b3e466
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_lint/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3b3e466

Please sign in to comment.