about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-06-26 22:42:44 +0000
committerbors <bors@rust-lang.org>2020-06-26 22:42:44 +0000
commitdda8a7fde92a0be3f18b863bf35bebf195f8ed5c (patch)
treee48a9f031be0e9b623e40396c4f711d934058bae /src/rustllvm/RustWrapper.cpp
parent7750c3d46bc19784adb1ee6e37a5ec7e4cd7e772 (diff)
parent7b2064f4f969062312ec3144e7901ea7b6be5b62 (diff)
downloadrust-dda8a7fde92a0be3f18b863bf35bebf195f8ed5c.tar.gz
rust-dda8a7fde92a0be3f18b863bf35bebf195f8ed5c.zip
Auto merge of #73596 - petrochenkov:shebang2, r=Mark-Simulacrum
rustc_lexer: Simplify shebang parsing once more

Fixes https://github.com/rust-lang/rust/issues/73250 (beta regression)

Treat any line starting with `!#` as a shebang candidate, not only lines with something non-whitespace.
This way we no longer need to define what `is_whitespace` means ([Linux shebang whitespace](https://github.com/torvalds/linux/blob/master/fs/binfmt_script.c), ASCII whitespace, Rust lexer whitespace, etc), which is nice.

This change makes some invalid Rust code valid (see the regression above), but still never interprets a fragment of valid Rust code as a shebang.

(This PR also removes one duplicate test.)
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions