fix(gc): a doc comment on a macro invocation fails -D warnings - #8181
Conversation
Both legs of `rustc-warnings` have been red on main and every PR with `error: unused doc comment`. That job runs `RUSTFLAGS: -D warnings`, so a warning that is cosmetic elsewhere is fatal there. rustdoc discards a `///` block attached to a macro invocation. This one sat above `crate::perry_thread_local!` in stack_maps.rs and arrived with #8084's #7803 native-slot verifier. Keep the text — it explains why the verifier exists — as a plain `//` comment, with a note recording why it cannot be `///`. Verified: `RUSTFLAGS="-D warnings" cargo check -p perry-runtime --lib` fails on main and exits 0 here, with zero warnings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe change converts an unused ChangesRust warning fix
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The PR replaces an invalid documentation comment with a regular comment, eliminating the warnings-as-errors build failure without changing runtime behavior. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #8176.
Both legs of
rustc-warnings—Warnings (product)andWarnings (host-compatible)— have been red onmainand every PR:Cause
A
///block directly above acrate::perry_thread_local!invocation atcrates/perry-runtime/src/gc/roots/stack_maps.rs:209. rustdoc discards a doc comment attached to a macro invocation, so rustc emitsunused_doc_comments. That is cosmetic in every other job and fatal in this one, which runsRUSTFLAGS: -D warnings.It arrived with #8084's #7803 native-slot verifier.
The fix
//instead of///. The text explains why the verifier exists and is worth keeping, so it stays as a plain comment with a line recording why it cannot be a doc comment — otherwise the next person restores///and re-breaks the gate.Verified both directions
cargo fmt --all -- --checkclean.Note on why this sat for a day
I saw this warning while validating #8084 and recorded it as pre-existing on the strength of it appearing in an unrelated build log. It was not pre-existing — it came in with that PR, and I merged it. The gate that would have caught it is the one it broke.
Summary by CodeRabbit
Bug Fixes
Documentation