rust/compiler/rustc_ast/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
..
attr Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
expand
util Rename some things related to literals. 2022-08-16 13:41:34 +10:00
ast_traits.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
ast.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
entry.rs Fixup missing renames from #[main] to #[rustc_main] 2022-06-22 18:24:09 +02:00
lib.rs Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
mut_visit.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
node_id.rs
ptr.rs Use delayed error handling for Encodable and Encoder infallible. 2022-06-08 07:01:26 +10:00
token.rs Revert #96682. 2022-06-02 11:22:16 +10:00
tokenstream.rs Remove TreeAndSpacing. 2022-07-29 15:52:15 +10:00
visit.rs Shrink ast::Attribute. 2022-08-16 11:10:13 +10:00