about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorHarrison Kaiser <uwaces@gmail.com>2024-12-15 20:06:02 -0500
committerHarrison Kaiser <uwaces@gmail.com>2024-12-16 23:34:46 -0500
commit1e33dd17115ca948c6e5ebf319695ed64490b2bf (patch)
tree4913499178aa13e7f003fbbd22571585bb8a91d8 /compiler/rustc_interface/src
parent13b77c687c0f5ad06a579af6d0787fe562747501 (diff)
downloadrust-1e33dd17115ca948c6e5ebf319695ed64490b2bf.tar.gz
rust-1e33dd17115ca948c6e5ebf319695ed64490b2bf.zip
Fix logical error with what text is considered whitespace.
There is a logical issue around what counts as leading white-space.
There is code which does a subtraction assuming that no errors will be reported
inside the leading whitespace. However we compute the length of
that whitespace with std::char::is_whitespace and not
rustc_lexer::is_whitespace. The former will include a no-break space while
later will excluded it. We can only safely make the assumption that no errors
will be reported  in whitespace if it is all "Rust Standard" whitespace.
Indeed an error does occur in unicode whitespace if it contains a no-break
space.
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions