619b8abaa6
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. |
||
---|---|---|
.. | ||
mbe | ||
mut_visit | ||
parse | ||
tokenstream | ||
base.rs | ||
build.rs | ||
config.rs | ||
errors.rs | ||
expand.rs | ||
lib.rs | ||
mbe.rs | ||
module.rs | ||
placeholders.rs | ||
proc_macro_server.rs | ||
proc_macro.rs | ||
tests.rs |