-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
End all lines in src/stage0 with trailing newline #139721
Conversation
Hm, I'm not sure if this can break other things I'm not aware of. Handing this over to someone who might have more clues. As in, it seems very reasonable to me, but I'm not fully aware of all the things that can potentially be affected. cc @onur-ozkan @Kobzol (in case u know more) |
The stage0 file already contains some blank lines: Line 21 in ae06b79 so I would expect that any tool which isn't expecting trailing newlines on every line would just hit its existing codepath for a blank line. |
Looks good :) @bors r+ rollup |
End all lines in src/stage0 with trailing newline Most tools that process text files prefer if every line ends in \n. Text files without the last newline are aberrant and usually not what you want. **Before:** ```console $ cat src/stage0 src/stage0 dist_server=https://static.rust-lang.org artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds ... dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.gz=986f6c594d37bcbd3833e053640ba8775f68d26a65c5618386654ef55d7b3542 dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843dist_server=https://static.rust-lang.org artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds ... dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.gz=986f6c594d37bcbd3833e053640ba8775f68d26a65c5618386654ef55d7b3542 dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843$ ▌ ``` **After:** ```console $ cat src/stage0 src/stage0 dist_server=https://static.rust-lang.org artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds ... dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.gz=986f6c594d37bcbd3833e053640ba8775f68d26a65c5618386654ef55d7b3542 dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843 dist_server=https://static.rust-lang.org artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds ... dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.gz=986f6c594d37bcbd3833e053640ba8775f68d26a65c5618386654ef55d7b3542 dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843 $ ▌ ```
…enton Rollup of 11 pull requests Successful merges: - rust-lang#138972 (std: Fix build for NuttX targets) - rust-lang#139177 (Use -C target-cpu=z13 on s390x vector test) - rust-lang#139511 (libtest: Pass the test's panic payload as Option instead of Result) - rust-lang#139605 (update ```miniz_oxide``` to 0.8.8) - rust-lang#139618 (compiletest: Make `SUGGESTION` annotations viral) - rust-lang#139677 (Fix profiler_builtins build script to handle full path to profiler lib) - rust-lang#139683 (Use `with_native_path` for Windows) - rust-lang#139695 (compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout) - rust-lang#139710 (Move `args` into `std::sys`) - rust-lang#139721 (End all lines in src/stage0 with trailing newline) - rust-lang#139726 (Move `select_unpredictable` to the `hint` module) r? `@ghost` `@rustbot` modify labels: rollup
…enton Rollup of 10 pull requests Successful merges: - rust-lang#138972 (std: Fix build for NuttX targets) - rust-lang#139177 (Use -C target-cpu=z13 on s390x vector test) - rust-lang#139511 (libtest: Pass the test's panic payload as Option instead of Result) - rust-lang#139605 (update ```miniz_oxide``` to 0.8.8) - rust-lang#139618 (compiletest: Make `SUGGESTION` annotations viral) - rust-lang#139677 (Fix profiler_builtins build script to handle full path to profiler lib) - rust-lang#139683 (Use `with_native_path` for Windows) - rust-lang#139710 (Move `args` into `std::sys`) - rust-lang#139721 (End all lines in src/stage0 with trailing newline) - rust-lang#139726 (Move `select_unpredictable` to the `hint` module) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139721 - dtolnay:stage0newline, r=onur-ozkan End all lines in src/stage0 with trailing newline Most tools that process text files prefer if every line ends in \n. Text files without the last newline are aberrant and usually not what you want. **Before:** ```console $ cat src/stage0 src/stage0 dist_server=https://static.rust-lang.org artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds ... dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.gz=986f6c594d37bcbd3833e053640ba8775f68d26a65c5618386654ef55d7b3542 dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843dist_server=https://static.rust-lang.org artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds ... dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.gz=986f6c594d37bcbd3833e053640ba8775f68d26a65c5618386654ef55d7b3542 dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843$ ▌ ``` **After:** ```console $ cat src/stage0 src/stage0 dist_server=https://static.rust-lang.org artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds ... dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.gz=986f6c594d37bcbd3833e053640ba8775f68d26a65c5618386654ef55d7b3542 dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843 dist_server=https://static.rust-lang.org artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds ... dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.gz=986f6c594d37bcbd3833e053640ba8775f68d26a65c5618386654ef55d7b3542 dist/2025-04-02/rustc-nightly-x86_64-unknown-netbsd.tar.xz=c0d9a88c30d2ab38ec3a11fabb5515ed9bc3ac1a8e35a438d68bf7ff82f6b843 $ ▌ ```
Most tools that process text files prefer if every line ends in \n. Text files without the last newline are aberrant and usually not what you want.
Before:
After: