rust/compiler/rustc_hir/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
..
arena.rs Remove unused arena kinds in rustc_hir and rustc_middle. 2023-11-20 15:05:26 +11:00
def_path_hash_map.rs Do not store stable crate id in on-disk hash map. 2023-12-24 17:22:48 +00:00
def.rs Add safe/unsafe to static inside extern blocks 2024-06-04 14:19:43 -03:00
definitions.rs Remove extern crate tracing from numerous crates. 2024-04-30 16:47:49 +10:00
diagnostic_items.rs Replace some instances of FxHashMap/FxHashSet with stable alternatives (mostly in rustc_hir and rustc_ast_lowering) 2023-12-18 21:03:32 +01:00
hir_id.rs Remove extern crate rustc_macros from numerous crates. 2024-04-29 10:21:54 +10:00
hir.rs Auto merge of #125918 - oli-obk:const_block_ice, r=compiler-errors 2024-06-07 09:08:59 +00:00
intravisit.rs Revert "Create const block DefIds in typeck instead of ast lowering" 2024-06-07 08:33:58 +00:00
lang_items.rs Auto merge of #124662 - zetanumbers:needs_async_drop, r=oli-obk 2024-05-31 10:12:24 +00:00
lib.rs Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
pat_util.rs Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
stable_hash_impls.rs Revert "Cache whether a body has inline consts" 2024-06-07 08:33:58 +00:00
target.rs Change DefKind::Static to a struct variant 2024-03-12 05:53:46 +00:00
tests.rs Construct SourceMap at the same time as SessionGlobals. 2024-04-16 13:02:53 +10:00
weak_lang_items.rs Rewrite implementation of #[alloc_error_handler] 2022-10-31 16:32:57 +00:00