about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/enum-option.js
diff options
context:
space:
mode:
authorRussell Cohen <russell.r.cohen@gmail.com>2020-04-23 15:51:12 -0400
committerRussell Cohen <russell.r.cohen@gmail.com>2020-05-25 10:11:08 -0400
commita93d31603f80e16a185cda3377c328ae85273325 (patch)
tree58f36476940275fd03a6f0addd747a29dcaa43bf /src/test/rustdoc-js-std/enum-option.js
parentee6c0dae394f67b5286909704f8f0a608696c96c (diff)
downloadrust-a93d31603f80e16a185cda3377c328ae85273325.tar.gz
rust-a93d31603f80e16a185cda3377c328ae85273325.zip
Fix bug in shebang handling
Shebang handling was too agressive in stripping out the first line in cases where it is actually _not_ a shebang, but instead, valid rust (#70528). This is a second attempt at resolving this issue (the first attempt was flawed, for, among other reasons, causing an ICE in certain cases (#71372, #71471).

The behavior is now codified by a number of UI tests, but simply:
For the first line to be a shebang, the following must all be true:
1. The line must start with `#!`
2. The line must contain a non whitespace character after `#!`
3. The next character in the file, ignoring comments & whitespace must not be `[`

I believe this is a strict superset of what we used to allow, so perhaps a crater run is unnecessary, but probably not a terrible idea.
Diffstat (limited to 'src/test/rustdoc-js-std/enum-option.js')
0 files changed, 0 insertions, 0 deletions