about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/interface.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-04 16:08:48 +0000
committerbors <bors@rust-lang.org>2024-05-04 16:08:48 +0000
commit1a851da73cdeb02e2c62d301aa6bd98e515a50da (patch)
tree87958b43e7902ba38b5df6b1fce451211a1acd43 /compiler/rustc_interface/src/interface.rs
parentd7ea27808deb5e10a0f7384e339e4e6165e33398 (diff)
parentf43e3e2023f28d7e7a9f870612c6f2ef867a2acb (diff)
downloadrust-1a851da73cdeb02e2c62d301aa6bd98e515a50da.tar.gz
rust-1a851da73cdeb02e2c62d301aa6bd98e515a50da.zip
Auto merge of #124704 - Urgau:fix-ignored-tests-fmt, r=GuillaumeGomez
Fix ignored tests for formatting

This PR fixes the ignored rules in `rustfmt.toml` that were changed in https://github.com/rust-lang/rust/pull/124613 to allow formatting `rmake.rs` but ended up allowing formatting every Rust files in `tests/`.

The fix is a bit involved since we need to workaround a [`.gitignore` pattern limitation](https://git-scm.com/docs/gitignore#_pattern_format):
> An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined.

Workaround using https://stackoverflow.com/a/5534865

I tested the fix by changing the formatting in an `rmake.rs` and UI test, and verifying that only the `rmake.rs` files were formatted.

Fixes https://github.com/rust-lang/rust/pull/124613#issuecomment-2094094670
cc `@GuillaumeGomez`
r? `@onur-ozkan`
Diffstat (limited to 'compiler/rustc_interface/src/interface.rs')
0 files changed, 0 insertions, 0 deletions