rust/src
Nicholas Nethercote b0440d359b Avoid useless Vec clones in pending_obligations().
The only instance of `ObligationForest` in use has an obligation type of
`PendingPredicateObligation`, which contains a `PredicateObligation` and a
`Vec<Ty>`.

`FulfillmentContext::pending_obligations()` calls
`ObligationForest::pending_obligations()`, which clones all the
`PendingPredicateObligation`s. But the `Vec<Ty>` field of those cloned
obligations is never touched.

This patch changes `ObligationForest::pending_obligations()` to
`map_pending_obligations` -- which gives callers control about which part
of the obligation to clone -- and takes advantage of the change to avoid
cloning the `Vec<Ty>`. The change speeds up runs of a few rustc-perf
benchmarks, the best by 1%.
2018-06-08 09:00:17 +10:00
..
bootstrap impl is_tool on Mode enum 2018-06-03 17:43:11 +03:00
build_helper
ci
dlmalloc@c99638dc2e
doc
etc
grammar
jemalloc@1f5a28755e
liballoc Rollup merge of #51312 - frewsxcv:clarify-hash-map-entry-get-mut, r=dtolnay 2018-06-02 19:55:09 -06:00
liballoc_jemalloc
liballoc_system
libarena
libbacktrace@f4d02bbdbf
libcompiler_builtins@4cfd7101eb
libcore Rollup merge of #51306 - kennytm:impl-default-for-mut-str, r=SimonSapin 2018-06-02 19:55:08 -06:00
libfmt_macros
libgraphviz
liblibc@a7e78a78e1
libpanic_abort
libpanic_unwind
libproc_macro
libprofiler_builtins
librustc Avoid useless Vec clones in pending_obligations(). 2018-06-08 09:00:17 +10:00
librustc_allocator
librustc_apfloat
librustc_asan
librustc_borrowck
librustc_codegen_llvm Auto merge of #51063 - mixi:musl-bootstrap, r=alexcrichton 2018-06-02 15:26:26 +00:00
librustc_codegen_utils
librustc_cratesio_shim
librustc_data_structures Avoid useless Vec clones in pending_obligations(). 2018-06-08 09:00:17 +10:00
librustc_driver
librustc_errors
librustc_incremental
librustc_lint merge UNNECESSARY_EXTERN_CRATE and UNUSED_EXTERN_CRATES 2018-06-01 11:00:18 -04:00
librustc_llvm
librustc_lsan
librustc_metadata
librustc_mir Specify that packed types must derive, not implement, Copy 2018-06-02 07:24:34 -06:00
librustc_msan
librustc_passes also check let arms and nested patterns for mutable borrows 2018-06-01 10:06:02 -04:00
librustc_platform_intrinsics
librustc_plugin
librustc_privacy
librustc_resolve
librustc_save_analysis
librustc_target
librustc_traits
librustc_tsan
librustc_typeck Avoid useless Vec clones in pending_obligations(). 2018-06-08 09:00:17 +10:00
librustdoc Auto merge of #51319 - Mark-Simulacrum:rollup, r=Mark-Simulacrum 2018-06-03 03:13:43 +00:00
libserialize
libstd Add a couple lines describing differences between into_mut/get_mut. 2018-06-02 18:07:23 -04:00
libstd_unicode
libsyntax
libsyntax_ext
libsyntax_pos
libterm
libtest
libunwind
llvm@9ad4b7e8d7
llvm-emscripten@2717444753
rtstartup
rustc
rustllvm
stdsimd@a19ca1cd91
test Auto merge of #51319 - Mark-Simulacrum:rollup, r=Mark-Simulacrum 2018-06-03 03:13:43 +00:00
tools update the miri submodule to master 2018-06-03 14:31:37 +02:00
Cargo.lock Update Cargo.lock 2018-06-01 15:00:17 +02:00
Cargo.toml
README.md
stage0.txt

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: