diff options
| author | bors <bors@rust-lang.org> | 2020-05-26 01:43:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-26 01:43:40 +0000 |
| commit | 9eedd138ee22147111a885d6948fb050d9849bf4 (patch) | |
| tree | 632e765c1e9e7cfa86312316324e318c9eddad9f /src/rustllvm/RustWrapper.cpp | |
| parent | 698c5c6d95218735afebdada8a518ab66e0e9213 (diff) | |
| parent | a93d31603f80e16a185cda3377c328ae85273325 (diff) | |
| download | rust-9eedd138ee22147111a885d6948fb050d9849bf4.tar.gz rust-9eedd138ee22147111a885d6948fb050d9849bf4.zip | |
Auto merge of #71487 - rcoh:71471-shebang, r=petrochenkov
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 reverted, 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. Fixes #70528
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
