rust/compiler/rustc_expand/src
Nicholas Nethercote 619b8abaa6 Use AttrVec in more places.
In some places we use `Vec<Attribute>` and some places we use
`ThinVec<Attribute>` (a.k.a. `AttrVec`). This results in various points
where we have to convert between `Vec` and `ThinVec`.

This commit changes the places that use `Vec<Attribute>` to use
`AttrVec`. A lot of this is mechanical and boring, but there are
some interesting parts:
- It adds a few new methods to `ThinVec`.
- It implements `MapInPlace` for `ThinVec`, and introduces a macro to
  avoid the repetition of this trait for `Vec`, `SmallVec`, and
  `ThinVec`.

Overall, it makes the code a little nicer, and has little effect on
performance. But it is a precursor to removing
`rustc_data_structures::thin_vec::ThinVec` and replacing it with
`thin_vec::ThinVec`, which is implemented more efficiently.
2022-08-22 07:35:33 +10:00
..
mbe Rollup merge of #100651 - nidnogg:diagnostics_migration_expand_transcribe, r=davidtwco 2022-08-18 05:10:47 +02:00
mut_visit
parse Remove TreeAndSpacing. 2022-07-29 15:52:15 +10:00
tokenstream Remove TreeAndSpacing. 2022-07-29 15:52:15 +10:00
base.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
build.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
config.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
errors.rs Replace #[lint/warning/error] with #[diag] 2022-08-21 09:17:43 +02:00
expand.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
lib.rs Moved structs to rustc_expand::errors, added several more migrations, fixed slug name 2022-08-17 11:18:19 -03:00
mbe.rs
module.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
placeholders.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
proc_macro_server.rs Rename some things related to literals. 2022-08-16 13:41:34 +10:00
proc_macro.rs Auto merge of #99887 - nnethercote:rm-TreeAndSpacing, r=petrochenkov 2022-07-30 14:50:05 +00:00
tests.rs