rust/src
Nicholas Nethercote 08683f003c Rename IdxSet::clone_from.
The current situation is something of a mess.

- `IdxSetBuf` derefs to `IdxSet`.
- `IdxSetBuf` implements `Clone`, and therefore has a provided `clone_from`
  method, which does allocation and so is expensive.
- `IdxSet` has a `clone_from` method that is non-allocating and therefore
  cheap, but this method is not from the `Clone` trait.

As a result, if you have an `IdxSetBuf` called `b`, if you call
`b.clone_from(b2)` you'll get the expensive `IdxSetBuf` method, but if you call
`(*b).clone_from(b2)` you'll get the cheap `IdxSetBuf` method.
`liveness_of_locals()` does the former, presumably unintentionally, and
therefore does lots of unnecessary allocations.

Having a `clone_from` method that isn't from the `Clone` trait is a bad idea in
general, so this patch renames it as `overwrite`. This avoids the unnecessary
allocations in `liveness_of_locals()`, speeding up most NLL benchmarks, the
best by 1.5%. It also means that calls of the form `(*b).clone_from(b2)` can be
rewritten as `b.overwrite(b2)`.
2018-06-29 09:57:19 +10:00
..
bootstrap Auto merge of #51725 - Mark-Simulacrum:no-llvm, r=kennytm 2018-06-26 16:26:00 +00:00
build_helper
ci Revert "Auto merge of #51662 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum" 2018-06-21 06:53:26 -06:00
dlmalloc@c99638dc2e
doc Auto merge of #49469 - Nokel81:allow-irrefutable-let-patterns, r=nikomatsakis 2018-06-26 09:20:33 +00:00
etc slightly improve rustdoc xml path error 2018-06-04 09:51:41 +02:00
grammar
jemalloc@1f5a28755e
liballoc Add str::split_ascii_whitespace. 2018-06-27 17:54:27 -04:00
liballoc_jemalloc Mark alloc_jemalloc as perma-unstable 2018-06-11 13:48:57 -07:00
liballoc_system Move Unstable Book sections for #[global_allocator] and System to std::alloc docs 2018-06-11 13:48:57 -07:00
libarena Make &Slice a thin pointer 2018-05-27 17:28:35 +02:00
libbacktrace@f4d02bbdbf Replace libbacktrace with a submodule 2018-05-30 05:58:23 -07:00
libcompiler_builtins@4cfd7101eb
libcore Rollup merge of #51842 - rust-lang:align-is-nonzero, r=cramertj 2018-06-28 06:15:43 +08:00
libfmt_macros
libgraphviz
liblibc@a7e78a78e1
libpanic_abort
libpanic_unwind
libproc_macro hygiene: Do not reset expansion info for quote! 2018-06-23 20:40:25 +03:00
libprofiler_builtins
librustc Auto merge of #51538 - nikomatsakis:nll-perf-examination, r=eddyb 2018-06-28 01:41:40 +00:00
librustc_allocator Implement #[macro_export(local_inner_macros)] 2018-06-27 13:10:16 +03:00
librustc_apfloat migrate codebase to ..= inclusive range patterns 2018-06-26 07:53:30 -07:00
librustc_asan Remove some '#[feature]' attributes for stabilized features 2018-06-11 13:48:57 -07:00
librustc_borrowck Rollup merge of #51769 - alexcameron89:update_rustc_guide_links, r=frewsxcv 2018-06-26 11:35:40 +02:00
librustc_codegen_llvm Make opaque::Encoder append-only and make it infallible 2018-06-27 11:43:15 +02:00
librustc_codegen_utils migrate codebase to ..= inclusive range patterns 2018-06-26 07:53:30 -07:00
librustc_cratesio_shim
librustc_data_structures Rename IdxSet::clone_from. 2018-06-29 09:57:19 +10:00
librustc_driver Attempt to fix hygiene for global_allocator 2018-06-24 16:10:20 -05:00
librustc_errors Also prevent overflow in debug builds 2018-06-03 11:24:58 +02:00
librustc_incremental Make opaque::Encoder append-only and make it infallible 2018-06-27 11:43:15 +02:00
librustc_lint Auto merge of #51149 - zackmdavis:․․․_to_․․=, r=nikomatsakis 2018-06-26 23:15:30 +00:00
librustc_llvm
librustc_lsan Remove some '#[feature]' attributes for stabilized features 2018-06-11 13:48:57 -07:00
librustc_metadata Make opaque::Encoder append-only and make it infallible 2018-06-27 11:43:15 +02:00
librustc_mir Rename IdxSet::clone_from. 2018-06-29 09:57:19 +10:00
librustc_msan Remove some '#[feature]' attributes for stabilized features 2018-06-11 13:48:57 -07:00
librustc_passes Auto merge of #51727 - varkor:expragain-to-exprcontinue, r=petrochenkov 2018-06-23 14:33:10 +00:00
librustc_platform_intrinsics
librustc_plugin Implement #[macro_export(local_inner_macros)] 2018-06-27 13:10:16 +03:00
librustc_privacy Rename ty_param_bound to generic_bound 2018-06-20 12:23:46 +01:00
librustc_resolve Implement #[macro_export(local_inner_macros)] 2018-06-27 13:10:16 +03:00
librustc_save_analysis hygiene: Merge NameAndSpan into ExpnInfo 2018-06-23 21:53:24 +03:00
librustc_target migrate codebase to ..= inclusive range patterns 2018-06-26 07:53:30 -07:00
librustc_traits rustfmt various files 2018-06-27 16:30:38 -04:00
librustc_tsan Remove some '#[feature]' attributes for stabilized features 2018-06-11 13:48:57 -07:00
librustc_typeck Auto merge of #51538 - nikomatsakis:nll-perf-examination, r=eddyb 2018-06-28 01:41:40 +00:00
librustdoc Auto merge of #51815 - oli-obk:lowering_cleanups2, r=nikomatsakis 2018-06-27 07:16:13 +00:00
libserialize Make opaque::Encoder append-only and make it infallible 2018-06-27 11:43:15 +02:00
libstd Rollup merge of #51824 - vorner:thread-local-try-with-doc, r=kennytm 2018-06-28 06:15:42 +08:00
libstd_unicode
libsyntax Rollup merge of #51799 - mark-i-m:lower_case_feature_gate, r=mark-i-m 2018-06-28 06:15:40 +08:00
libsyntax_ext Implement #[macro_export(local_inner_macros)] 2018-06-27 13:10:16 +03:00
libsyntax_pos Implement #[macro_export(local_inner_macros)] 2018-06-27 13:10:16 +03:00
libterm migrate codebase to ..= inclusive range patterns 2018-06-26 07:53:30 -07:00
libtest
libunwind
llvm@9ad4b7e8d7 more reverts 2018-05-24 16:22:58 +02:00
llvm-emscripten@2717444753
rtstartup
rustc
rustllvm Rollup merge of #50827 - nox:llvmup, r=eddyb 2018-05-20 04:16:01 +08:00
stdsimd@a19ca1cd91 rever tool changes 2018-05-24 16:21:23 +02:00
test Auto merge of #51859 - kennytm:rollup, r=kennytm 2018-06-27 23:41:23 +00:00
tools add edition compiletest header + fix tests 2018-06-26 19:32:00 -05:00
Cargo.lock remove either dependency we are not using 2018-06-27 07:05:40 -04:00
Cargo.toml Change the comment on opt-level = 2 to point to https://github.com/rust-lang/rust/issues/50867 2018-05-29 17:38:23 +02:00
README.md rustc: rename ty::maps to ty::query. 2018-06-14 18:05:12 +03:00
stage0.txt Revert "Auto merge of #51662 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum" 2018-06-21 06:53:26 -06:00

This directory contains the source code of the rust project, including:

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc guide.

Their is also useful content in the following READMEs, which are gradually being moved over to the guide: