summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-08-17 12:34:33 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-08-22 07:35:33 +1000
commit619b8abaa65efd7fcc05453381e532ed8b716cf0 (patch)
treeaf5daccfb5d946c45ff0d60f2299533dcdea5490 /compiler/rustc_interface/src/errors.rs
parent650bff80a623e17675ac72ae4d62ed200a4a3568 (diff)
downloadrust-619b8abaa65efd7fcc05453381e532ed8b716cf0.tar.gz
rust-619b8abaa65efd7fcc05453381e532ed8b716cf0.zip
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.
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions