This website requires JavaScript.
Explore
Help
Register
Sign In
rust-lang
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Actions
2
Packages
Projects
Releases
Wiki
Activity
Files
901b340c1f5d208561d4261cc3ee634973b35326
rust
/
tests
/
ui
/
parser
/
shebang
/
issue-71471-ignore-tidy.rs
5 lines
63 B
Rust
Raw
Normal View
History
Unescape
Escape
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.
2020-04-23 15:51:12 -04:00
#!B //~ expected `[`, found `B`
Annotate `input` reference tests
2024-10-30 16:47:47 -07:00
//@ reference: input.shebang
Reference in New Issue
Copy Permalink