Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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? @petrochenkov
- Loading branch information