1
Fork 0
rust/compiler/rustc_builtin_macros/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
..
assert Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
deriving Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
format_foreign update tests 2021-12-31 12:51:27 -05:00
asm.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
assert.rs Box the MacCall in various types. 2022-08-17 08:10:56 +10:00
cfg.rs Replace #[lint/warning/error] with #[diag] 2022-08-21 09:17:43 +02:00
cfg_accessible.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
cfg_eval.rs rustc_parse: Move AST -> TokenStream conversion logic to rustc_ast 2022-05-22 12:01:07 +03:00
cmdline_attrs.rs Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
compile_error.rs check_doc_keyword: don't alloc string for emptiness check 2022-04-08 11:45:57 +03:00
concat.rs Adopt let else in more places 2022-02-19 17:27:43 +01:00
concat_bytes.rs Make ExtCtxt::expr_lit non-pub. 2022-08-16 11:17:15 +10:00
concat_idents.rs Remove TreeAndSpacing. 2022-07-29 15:52:15 +10:00
derive.rs Rename some things related to literals. 2022-08-16 13:41:34 +10:00
edition_panic.rs Box the MacCall in various types. 2022-08-17 08:10:56 +10:00
env.rs check_doc_keyword: don't alloc string for emptiness check 2022-04-08 11:45:57 +03:00
format.rs Make ExtCtxt::expr_lit non-pub. 2022-08-16 11:17:15 +10:00
format_foreign.rs [rustc_builtin_macros] add indices to format_foreign::printf::Substitution::Escape 2021-12-31 12:42:15 -05:00
global_allocator.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
lib.rs Adjust cfgs 2022-08-12 16:28:15 -04:00
log_syntax.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
proc_macro_harness.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
source_util.rs Make ExtCtxt::expr_lit non-pub. 2022-08-16 11:17:15 +10:00
standard_library_imports.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
test.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
test_harness.rs Use AttrVec in more places. 2022-08-22 07:35:33 +10:00
trace_macros.rs Remove TreeAndSpacing. 2022-07-29 15:52:15 +10:00
util.rs Add a lint for duplicated attributes. 2021-12-15 23:43:13 +01:00