rust/src
Nicholas Nethercote 05a0dfe8cd 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 Merge commit 'ea199bacef' into rustfmt-sync 2021-11-07 20:37:34 -06:00
bin Create 2024 edition 2022-04-02 02:45:49 -04:00
cargo-fmt Merge commit 'c4416f20dc' into sync-rustfmt 2022-06-22 22:14:32 -05:00
config Merge commit 'c4416f20dc' into sync-rustfmt 2022-06-22 22:14:32 -05:00
emitter Merge commit '5ff7b632a9' into sync-rustfmt-subtree 2022-03-29 23:17:30 -05:00
format-diff Merge commit '7b73b60fac' into sync-rustfmt 2022-06-12 22:03:05 -05:00
formatting Merge commit 'efa8f5521d' into rustfmt-subtree 2021-10-20 00:11:59 -05:00
git-rustfmt Merge commit 'ea199bacef' into rustfmt-sync 2021-11-07 20:37:34 -06:00
modules Merge commit '4a053f206f' into sync-rustfmt-subtree 2021-12-29 20:49:39 -06:00
parse Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
test Merge commit '7b73b60fac' into sync-rustfmt 2022-06-12 22:03:05 -05:00
attr.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
chains.rs Do not consider method call receiver as an argument in AST. 2022-08-10 18:34:54 +02:00
closures.rs implement rustfmt formatting for for<> closure binders 2022-07-12 21:00:13 +04:00
comment.rs Merge commit 'c4416f20dc' into sync-rustfmt 2022-06-22 22:14:32 -05:00
coverage.rs Implement closing-block procedure without relying on missed_span module (#3691) 2019-07-17 23:07:12 +09:00
emitter.rs add json emit mode (#3735) 2019-08-16 11:14:53 +09:00
expr.rs Rename some things related to literals. 2022-08-16 13:41:34 +10:00
format_report_formatter.rs Merge commit '7b73b60fac' into sync-rustfmt 2022-06-12 22:03:05 -05:00
formatting.rs Merge commit 'c4416f20dc' into sync-rustfmt 2022-06-22 22:14:32 -05:00
ignore_path.rs Merge commit '5ff7b632a9' into sync-rustfmt-subtree 2022-03-29 23:17:30 -05:00
imports.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
items.rs ast: Add span to Extern 2022-07-02 23:30:03 +01:00
lib.rs Merge commit '7b73b60fac' into sync-rustfmt 2022-06-12 22:03:05 -05:00
lists.rs Merge commit '5ff7b632a9' into sync-rustfmt-subtree 2022-03-29 23:17:30 -05:00
macros.rs Remove TreeAndSpacing. 2022-07-29 15:52:15 +10:00
matches.rs Merge commit '4a053f206f' into sync-rustfmt-subtree 2021-12-29 20:49:39 -06:00
missed_spans.rs Merge commit 'efa8f5521d' into rustfmt-subtree 2021-10-20 00:11:59 -05:00
modules.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
overflow.rs Merge commit '7b73b60fac' into sync-rustfmt 2022-06-12 22:03:05 -05:00
pairs.rs Merge commit 'ea199bacef' into rustfmt-sync 2021-11-07 20:37:34 -06:00
patterns.rs Merge commit '4a053f206f' into sync-rustfmt-subtree 2021-12-29 20:49:39 -06:00
release_channel.rs Move macro to separate module 2019-05-17 16:13:46 +02:00
reorder.rs Merge commit 'c4416f20dc' into sync-rustfmt 2022-06-22 22:14:32 -05:00
rewrite.rs Merge commit 'c4416f20dc' into sync-rustfmt 2022-06-22 22:14:32 -05:00
rustfmt_diff.rs Merge commit '4a053f206f' into sync-rustfmt-subtree 2021-12-29 20:49:39 -06:00
shape.rs Merge commit 'c4416f20dc' into sync-rustfmt 2022-06-22 22:14:32 -05:00
skip.rs Shrink ast::Attribute. 2022-08-16 11:10:13 +10:00
source_file.rs Merge commit '4a053f206f' into sync-rustfmt-subtree 2021-12-29 20:49:39 -06:00
source_map.rs refactor: backport syntux mod 2020-03-26 21:25:34 -05:00
spanned.rs Merge commit '5ff7b632a9' into sync-rustfmt-subtree 2022-03-29 23:17:30 -05:00
stmt.rs Preserve comments in empty statements (#4180) 2020-10-24 11:13:00 -05:00
string.rs Merge commit '7b73b60fac' into sync-rustfmt 2022-06-12 22:03:05 -05:00
syntux.rs refactor: backport syntux mod 2020-03-26 21:25:34 -05:00
types.rs implement rustfmt formatting for for<> closure binders 2022-07-12 21:00:13 +04:00
utils.rs implement rustfmt formatting for for<> closure binders 2022-07-12 21:00:13 +04:00
vertical.rs Merge commit '5ff7b632a9' into sync-rustfmt-subtree 2022-03-29 23:17:30 -05:00
visitor.rs Shrink ast::Attribute. 2022-08-16 11:10:13 +10:00