rust/compiler/rustc_ast_lowering/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
..
asm.rs Completely remove captures flag 2022-08-04 11:26:53 -03:00
block.rs Completely remove captures flag 2022-08-04 11:26:53 -03:00
expr.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
index.rs Make Node::ExprField a child of Node::Expr. 2022-08-11 21:48:39 -07:00
item.rs Remove {ast,hir}::WhereEqPredicate::id. 2022-08-16 12:13:23 +10:00
lib.rs Rollup merge of #100018 - nnethercote:clean-up-LitKind, r=petrochenkov 2022-08-17 12:32:49 +02:00
lifetime_collector.rs Simplify rustc_ast::visit::Visitor::visit_poly_trait_ref. 2022-08-11 11:10:01 +10:00
pat.rs Check attributes on pattern fields. 2022-08-11 21:48:39 -07:00
path.rs Completely remove captures flag 2022-08-04 11:26:53 -03:00