Commit 6cad1e3
authored
Rollup merge of rust-lang#71634 - eddyb:revert-71372, r=petrochenkov
Revert rust-lang#71372 ("Fix #! (shebang) stripping account space issue").
While rust-lang#71372 fixed some of the problems `#!`-stripping had, it introduced others:
* inefficient implementation (`.chars().filter(...).collect()` on the entire input file)
* this also means the length returned isn't always correct, leading to e.g. rust-lang#71471
* it ignores whitespace anywhere, stripping ` # ! ...` which isn't a valid shebang
* the definition of "whitespace" it uses includes newlines, which means even `\n#\n!\n...` is stripped as a shebang (and anything matching the regex `\s*#\s*!\s*`, and not followed by `[`, really)
* it's backward-incompatible but didn't go through Crater
Now, rust-lang#71487 is already open and will solve all of these issues. But for running Crater, and just in case rust-lang#71487 takes a bit longer, I decided it's safer to just revert rust-lang#71372.
This will also make rust-lang#71372's diff clearer, as it will start again from the original whitespace-unaware version.
r? @petrochenkov2 files changed
+1
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
| 239 | + | |
241 | 240 | | |
242 | 241 | | |
243 | 242 | | |
244 | 243 | | |
245 | 244 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | 245 | | |
251 | 246 | | |
252 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | 148 | | |
0 commit comments