rust/compiler/rustc_builtin_macros/src
bors eac6c33bc6 Auto merge of #100869 - nnethercote:replace-ThinVec, r=spastorino
Replace `rustc_data_structures::thin_vec::ThinVec` with `thin_vec::ThinVec`

`rustc_data_structures::thin_vec::ThinVec` looks like this:
```
pub struct ThinVec<T>(Option<Box<Vec<T>>>);
```
It's just a zero word if the vector is empty, but requires two
allocations if it is non-empty. So it's only usable in cases where the
vector is empty most of the time.

This commit removes it in favour of `thin_vec::ThinVec`, which is also
word-sized, but stores the length and capacity in the same allocation as
the elements. It's good in a wider variety of situation, e.g. in enum
variants where the vector is usually/always non-empty.

The commit also:
- Sorts some `Cargo.toml` dependency lists, to make additions easier.
- Sorts some `use` item lists, to make additions easier.
- Changes `clean_trait_ref_with_bindings` to take a
  `ThinVec<TypeBinding>` rather than a `&[TypeBinding]`, because this
  avoid some unnecessary allocations.

r? `@spastorino`
2022-09-01 08:01:06 +00:00
..
assert Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
deriving Auto merge of #100869 - nnethercote:replace-ThinVec, r=spastorino 2022-09-01 08:01:06 +00: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 Remove the symbol from ast::LitKind::Err. 2022-08-23 16:56:24 +10:00
concat_bytes.rs Remove the symbol from ast::LitKind::Err. 2022-08-23 16:56:24 +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 Separate CountIsStar from CountIsParam in rustc_parse_format. 2022-08-25 14:49:09 +02: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 Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
lib.rs Revert let_chains stabilization 2022-08-29 19:34:11 +02: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 Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
test.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
test_harness.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +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