docs(fast-math): correct float_algebraic flag set (drop afn)#5100
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThis PR updates documentation references to Rust nightly ChangesFast-Math Documentation Correction
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CLAUDE.md`:
- Line 11: Revert the accidental version bump in both files: in CLAUDE.md (lines
11-11) change the "**Current Version:**" line back to "0.5.1164", and in
Cargo.toml (lines 204-204) revert the [workspace.package] version field back to
"0.5.1164" (undo the edit that changed the version to 0.5.1165); no other
changes are needed—the maintainer will update both at merge time.
In `@docs/po/th.po`:
- Around line 51030-51038: Ensure all expected PO files
(docs/po/{de,es,fr,id,it,ja,ko,th,vi,zh-CN}.po) and docs/po/messages.pot are
present and synchronized; scan every docs/po/*.po and docs/po/messages.pot for
any residual "+ afn" fragments in entries related to "float_algebraic" and
remove them; confirm Cargo.toml is bumped to 0.5.1165 and CHANGELOG.md contains
the "## v0.5.1165" entry, and then update CLAUDE.md to show "Current Version:
0.5.1165" (or explicitly mark that updating CLAUDE.md is left to the maintainer)
so all metadata/version references are consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 06b89f55-e652-4f46-8611-6abe0fa2481a
📒 Files selected for processing (15)
CHANGELOG.mdCLAUDE.mdCargo.tomldocs/po/de.podocs/po/es.podocs/po/fr.podocs/po/id.podocs/po/it.podocs/po/ja.podocs/po/ko.podocs/po/messages.potdocs/po/th.podocs/po/vi.podocs/po/zh-CN.podocs/src/cli/fast-math.md
| Perry is a native TypeScript compiler written in Rust that compiles TypeScript source code directly to native executables. It uses SWC for TypeScript parsing and LLVM for code generation. | ||
|
|
||
| **Current Version:** 0.5.1164 | ||
| **Current Version:** 0.5.1165 |
There was a problem hiding this comment.
Version metadata in both files should be updated by maintainer at merge time, not by external contributor.
Both CLAUDE.md and Cargo.toml contain version bumps that should be applied only by the maintainer when the PR is merged. Per the workflow explicitly documented in CLAUDE.md (lines 44–46), external contributor PRs must not modify [workspace.package] version in Cargo.toml or the **Current Version:** line in CLAUDE.md. This policy prevents patch-version collisions that occur when multiple commits land on main while a PR is in review.
CLAUDE.md#L11: Revert the**Current Version:**update to0.5.1164.Cargo.toml#L204: Revert theversionfield to"0.5.1164".
The maintainer will bump both to 0.5.1165 at merge time.
📍 Affects 2 files
CLAUDE.md#L11-L11(this comment)Cargo.toml#L204-L204
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CLAUDE.md` at line 11, Revert the accidental version bump in both files: in
CLAUDE.md (lines 11-11) change the "**Current Version:**" line back to
"0.5.1164", and in Cargo.toml (lines 204-204) revert the [workspace.package]
version field back to "0.5.1164" (undo the edit that changed the version to
0.5.1165); no other changes are needed—the maintainer will update both at merge
time.
Sources: Coding guidelines, Learnings
Rust's #![feature(float_algebraic)] enables reassoc + nsz + arcp + contract but never afn. The --fast-math reference page wrongly listed afn in that set. Reported by @saethlin on commit cdc9bce. Fixes the source page plus the matching msgid/msgstr across the .pot and every translation. The standalone afn bullet (a flag Perry does not enable) and the 'strictly more conservative' conclusion are unchanged.
e7d4ec4 to
2761072
Compare
What
The
--fast-mathreference page claimed Rust nightly's#![feature(float_algebraic)]enablesreassoc + contract + nsz + arcp + afn. That's wrong — Rust's algebraic float operations enablereassoc + nsz + arcp + contractbut neverafn.afn(approximate functions) would let LLVM substitute lower-precision math intrinsics, which the algebraic intrinsics deliberately do not permit.Why
Reported by @saethlin reviewing commit
cdc9bce(2026-05-06):The error was never fixed and was still live on
main.Change
+ afnfrom thefloat_algebraicdescription indocs/src/cli/fast-math.md.msgid/msgstracrossdocs/po/messages.potand everydocs/po/*.potranslation (the flag list is verbatim in every language).The standalone
afnbullet — which correctly describes a flag Perry does not enable — is unchanged, and the page's "Perry's--fast-mathis strictly more conservative" conclusion still holds (Perry only enablesreassoc + contract).Generated
docs/book/**HTML is a build artifact (not git-tracked) and regenerates on the nextmdbookbuild.Summary by CodeRabbit
reassoc + contract + nsz + arcp. Translations updated accordingly.