about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-10-20 14:19:28 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-10-25 07:56:41 +1100
commitb7bea6e46fa1f00d96a779cc75f5a652cf5cdc5d (patch)
tree0a81a9ac514ed786669ff5b63bf83adb103435d1 /library/std/src
parent6aeac60e5d37387cb1b2d295ada5058765da1b33 (diff)
downloadrust-b7bea6e46fa1f00d96a779cc75f5a652cf5cdc5d.tar.gz
rust-b7bea6e46fa1f00d96a779cc75f5a652cf5cdc5d.zip
Fix a bug in tidy's alphabetical checking.
Currently, if a `tidy-alphabetical-end` marker appears on the last line
of a file, tidy will erroneously issue a "reach end of file expecting
`tidy-alphabetical-end`" error. This is because it uses `take_while`
within `check_section`, which consumes the line with the end marker, and
then after `check_section` returns `check` peeks for at least one more
line, which won't be there is the marker was on the last line.

This commit fixes the problem, by removing the use of `take_while`, and
doing the "reached end of file" test within `check_section` without
using `peek`.

It also renames `{START,END}_COMMENT` as `{START,END}_MARKER`, which is
a more appropriate name.
Diffstat (limited to 'library/std/src')
0 files changed, 0 insertions, 0 deletions