rust/compiler/rustc_session/src
Nicholas Nethercote 75b164d836 Use tidy to sort crate attributes for all compiler crates.
We already do this for a number of crates, e.g. `rustc_middle`,
`rustc_span`, `rustc_metadata`, `rustc_span`, `rustc_errors`.

For the ones we don't, in many cases the attributes are a mess.
- There is no consistency about order of attribute kinds (e.g.
  `allow`/`deny`/`feature`).
- Within attribute kind groups (e.g. the `feature` attributes),
  sometimes the order is alphabetical, and sometimes there is no
  particular order.
- Sometimes the attributes of a particular kind aren't even grouped
  all together, e.g. there might be a `feature`, then an `allow`, then
  another `feature`.

This commit extends the existing sorting to all compiler crates,
increasing consistency. If any new attribute line is added there is now
only one place it can go -- no need for arbitrary decisions.

Exceptions:
- `rustc_log`, `rustc_next_trait_solver` and `rustc_type_ir_macros`,
  because they have no crate attributes.
- `rustc_codegen_gcc`, because it's quasi-external to rustc (e.g. it's
  ignored in `rustfmt.toml`).
2024-06-12 15:49:10 +10:00
..
config Add rustfmt cfg to well known cfgs list 2024-05-05 14:30:35 +02:00
code_stats.rs -Zprint-type-sizes: print the types of awaitees and unnamed coroutine locals. 2024-03-22 18:07:15 -07:00
config.rs coverage: Add CLI support for -Zcoverage-options=condition 2024-05-30 15:38:46 +10:00
cstore.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
errors.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
filesearch.rs Improve naming and path operations in crate loader 2024-06-06 21:53:29 +02:00
lib.rs Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
options.rs coverage: Add CLI support for -Zcoverage-options=condition 2024-05-30 15:38:46 +10:00
output.rs Make incremental sessions identity no longer depend on the crate names provided by source code 2024-03-13 16:40:02 +01:00
parse.rs Rename buffer_lint_with_diagnostic to buffer_lint 2024-05-21 20:16:39 +00:00
search_paths.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
session.rs coverage: Add CLI support for -Zcoverage-options=condition 2024-05-30 15:38:46 +10:00
utils.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
version.rs Implement IntoDiagArg for RustcVersion 2024-05-21 20:11:42 +00:00