Put insert's summary line back on insert - #480
Merged
Merged
Conversation
has_walk was inserted between insert's doc comment and insert in #479, so the comment was swallowed: has_walk's rustdoc SUMMARY LINE -- the one line shown in generated docs, an IDE hover and a symbol list -- read "File a freshly prepared walk, evicting the least recently used one", which describes insert and is the opposite of what has_walk does (it counts no hit and moves nothing). insert, the function that actually evicts, was left undocumented. One line moved, nothing else. **Why it got through:** it compiles, every test passes, and no content was lost -- both sentences were present, attached to the wrong functions. The only tell is reading the file. It came from anchoring an insertion on `pub fn insert` when the doc comment for that function sits ABOVE the line anchored on; an insert anchored on a signature lands inside the preceding item's documentation. Refs #473 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One line moved.
has_walkwas inserted betweeninsert's doc comment andinsertin #479, so the comment was swallowed:Two consequences.
has_walk's rustdoc summary line — the one line thatshows in generated docs, in an IDE hover and in a symbol list — read "File a
freshly prepared walk, evicting the least recently used one", which describes
insertand is the opposite of whathas_walkdoes: it counts no hit andmoves nothing. And
insert, the function that actually evicts, was leftundocumented.
Why nothing caught it. It compiles, every test passes, and no content was
lost — both sentences were present, attached to the wrong functions. The only
tell is reading the file, which is how it was found: diffing the merged branch
against
mainto prove the content had landed byte-identically.The cause is worth naming, because the tool makes it easy: anchoring an
insertion on
pub fn insertputs the new item above that line, and a Rustdoc comment sits above the signature it documents — so an insert anchored on a
signature lands inside the preceding item's documentation. Anchor on the
doc comment's first line, or on the blank line before it.
🤖 Generated with Claude Code