1
Fork 0
rust/compiler/rustc_builtin_macros/src
bors a48396984a Auto merge of #116688 - compiler-errors:rustfmt-up, r=WaffleLapkin,Nilstrieb
Format all the let-chains in compiler crates

Since rust-lang/rustfmt#5910 has landed, soon we will have support for formatting let-chains (as soon as rustfmt syncs and beta gets bumped).

This PR applies the changes [from master rustfmt to rust-lang/rust eagerly](374997516), so that the next beta bump does not have to deal with a 200+ file diff and can remain concerned with other things like `cfg(bootstrap)` -- #113637 was a pain to land, for example, because of let-else.

I will also add this commit to the ignore list after it has landed.

The commands that were run -- I'm not great at bash-foo, but this applies rustfmt to every compiler crate, and then reverts the two crates that should probably be formatted out-of-tree.
```
~/rustfmt $ ls -1d ~/rust/compiler/* | xargs -I@ cargo run --bin rustfmt -- `@/src/lib.rs` --config-path ~/rust --edition=2021 # format all of the compiler crates
~/rust $ git checkout HEAD -- compiler/rustc_codegen_{gcc,cranelift} # revert changes to cg-gcc and cg-clif
```

cc `@rust-lang/rustfmt`
r? `@WaffleLapkin` or `@Nilstrieb` who said they may be able to review this purely mechanical PR :>

cc `@Mark-Simulacrum` and `@petrochenkov,` who had some thoughts on the order of operations with big formatting changes in https://github.com/rust-lang/rust/pull/95262#issue-1178993801. I think the situation has changed since then, given that let-chains support exists on master rustfmt now, and I'm fairly confident that this formatting PR should land even if *bootstrap* rustfmt doesn't yet format let-chains in order to lessen the burden of the next beta bump.
2023-10-15 13:23:55 +00:00
..
assert Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
deriving Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
format_foreign Use as_deref in compiler (but only where it makes sense) 2022-11-16 21:58:58 +00:00
alloc_error_handler.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
asm.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
assert.rs Don't escape_debug the condition of assert!. 2023-10-10 09:08:11 +11:00
cfg.rs rustc: Move features from Session to GlobalCtxt 2023-08-11 16:51:50 +08:00
cfg_accessible.rs Migrate most of rustc_builtin_macros to diagnostic impls 2023-04-10 21:16:53 +01:00
cfg_eval.rs rustc: Move features from Session to GlobalCtxt 2023-08-11 16:51:50 +08:00
cmdline_attrs.rs Migrate some rustc_builtin_macros to SessionDiagnostic 2023-06-25 01:32:30 +08:00
compile_error.rs Use Cow in {D,Subd}iagnosticMessage. 2023-05-29 09:23:43 +10:00
concat.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
concat_bytes.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
concat_idents.rs refactor: use by-ref TokenTree iterator to avoid a few clones 2023-05-11 21:59:38 -05:00
derive.rs use ErrorGuaranteed instead of booleans 2023-06-19 21:34:59 +02:00
edition_panic.rs Remove MacDelimiter. 2023-08-03 09:03:30 +10:00
env.rs builtin_macros: raw str in diagnostic output 2023-07-25 11:12:52 +01:00
errors.rs add diagnostic for raw identifiers in format string 2023-09-06 18:55:45 +02:00
format.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
format_foreign.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
global_allocator.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
lib.rs Misc improvements 2023-10-13 10:22:33 -03:00
log_syntax.rs
proc_macro_harness.rs rustc: Move features from Session to GlobalCtxt 2023-08-11 16:51:50 +08:00
source_util.rs Load include_bytes! directly into an Lrc 2023-08-27 20:16:19 -04:00
standard_library_imports.rs rustc: Move features from Session to GlobalCtxt 2023-08-11 16:51:50 +08:00
test.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
test_harness.rs Factor out the two entry_point_type functions. 2023-10-01 20:45:09 +11:00
trace_macros.rs Migrate some rustc_builtin_macros to SessionDiagnostic 2023-06-25 01:32:30 +08:00
type_ascribe.rs Add unstable type_ascribe macro 2022-11-19 22:16:42 +01:00
util.rs rustc: Remove unused Session argument from some attribute functions 2023-03-22 13:55:55 +04:00