summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-22 00:34:02 +0000
committerbors <bors@rust-lang.org>2022-08-22 00:34:02 +0000
commit3ce46b74aa3968b459cff3ce5c0d4f13e220b217 (patch)
tree6ac719850e121ccc2c5f7826874a2fb9de8b768e /compiler/rustc_interface/src/errors.rs
parent0b71ffca18a9f4a9515773b2c23d13f501d1e08f (diff)
parent619b8abaa65efd7fcc05453381e532ed8b716cf0 (diff)
downloadrust-3ce46b74aa3968b459cff3ce5c0d4f13e220b217.tar.gz
rust-3ce46b74aa3968b459cff3ce5c0d4f13e220b217.zip
Auto merge of #100668 - nnethercote:use-AttrVec-more, r=spastorino
Use `AttrVec` more

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::ThinVec` and replacing it with
`thin_vec::ThinVec`, which is implemented more efficiently.

r? `@spastorino`
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions