rust/src/librustdoc
Nicholas Nethercote b38106b6d8 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.
2022-08-29 15:42:13 +10:00
..
clean Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
doctest Rename TestOptions to GlobalTestOptions 2021-12-12 17:46:19 -08:00
formats rustdoc: box ItemKind::Trait 2022-08-16 13:09:37 -07:00
html Rollup merge of #101063 - GuillaumeGomez:merge-duplicated-css, r=notriddle 2022-08-27 13:14:26 +09:00
json Auto merge of #100645 - notriddle:notriddle/rustdoc-diet-plan, r=GuillaumeGomez 2022-08-21 16:40:26 +00:00
passes extend attrs if local_def_id exists 2022-08-28 01:20:26 +09:00
theme Update minifier version to 0.2.1 2022-06-07 11:38:51 +02:00
askama.toml Move back templates into html folder 2022-01-19 11:13:24 +01:00
Cargo.toml Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
config.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
core.rs Change maybe_body_owned_by to take local def id 2022-07-29 18:25:58 -04:00
docfs.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
doctest.rs Simplify rustc_hir::intravisit::Visitor::visit_variant_data. 2022-08-11 10:54:01 +10:00
error.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
externalfiles.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
fold.rs Remove box syntax from Box<rustdoc::clean::types::ItemKind> construction 2022-07-29 19:30:23 +02:00
lib.rs Adjust cfgs 2022-08-12 16:28:15 -04:00
lint.rs Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
markdown.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
README.md rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.org 2020-03-10 17:08:18 -03:00
scrape_examples.rs Make Rustdoc exit with correct error code when scrape examples from invalid files 2022-08-01 00:23:19 -07:00
theme.rs Update minifier version to 0.2.1 2022-06-07 11:38:51 +02:00
visit.rs Remove unused field in ItemKind::KeywordItem 2022-07-21 16:05:17 +02:00
visit_ast.rs Fix rustdoc JSON inline 2022-07-16 13:39:38 +02:00
visit_lib.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00

For more information about how librustdoc works, see the rustc dev guide.