rust/src
Nicholas Nethercote e80a93040f Make TokenStream less recursive.
`TokenStream` is currently recursive in *two* ways:

- the `TokenTree` variant contains a `ThinTokenStream`, which can
  contain a `TokenStream`;

- the `TokenStream` variant contains a `Vec<TokenStream>`.

The latter is not necessary and causes significant complexity. This
commit replaces it with the simpler `Vec<(TokenTree, IsJoint)>`.

This reduces complexity significantly. In particular, `StreamCursor` is
eliminated, and `Cursor` becomes much simpler, consisting now of just a
`TokenStream` and an index.

The commit also removes the `Extend` impl for `TokenStream`, because it
is only used in tests. (The commit also removes those tests.)

Overall, the commit reduces the number of lines of code by almost 200.
2019-01-08 15:08:46 +11:00
..
bootstrap Don't package up libLLVM.so with libstd 2019-01-02 13:07:26 -08:00
build_helper Remove licenses 2018-12-25 21:08:33 -07:00
ci ci: Upgrade Travis to Xenial 2019-01-03 12:22:37 -08:00
doc Rollup merge of #57314 - wiktorkuchta:master, r=Centril 2019-01-05 23:56:59 +08:00
etc Remove the private generic NonZero<T> wrapper type. 2018-12-26 20:54:10 +01:00
grammar Remove licenses 2018-12-25 21:08:33 -07:00
liballoc Rollup merge of #57313 - Nemo157:box-to-pin, r=cramertj 2019-01-05 23:56:58 +08:00
libarena Check the correct arena 2019-01-01 20:06:50 +01:00
libcore Auto merge of #57354 - kennytm:rollup, r=kennytm 2019-01-05 17:39:59 +00:00
libfmt_macros Point at correct span for arguments in format strings 2018-12-26 20:36:02 -08:00
libgraphviz Remove licenses 2018-12-25 21:08:33 -07:00
libpanic_abort Bound sgx target_env with fortanix as target_vendor 2018-12-31 16:32:56 -08:00
libpanic_unwind Remove licenses 2018-12-25 21:08:33 -07:00
libproc_macro Work-around for shadowing of variant names with assoc const names in libproc_macro/bridge/rpc.rs. 2018-12-26 21:40:21 +00:00
libprofiler_builtins Remove licenses 2018-12-25 21:08:33 -07:00
librustc Make sure feature gate errors are recoverable (take 2) 2019-01-06 14:58:17 +03:00
librustc_allocator Remove licenses 2018-12-25 21:08:33 -07:00
librustc_apfloat Fix repeated word typos 2019-01-03 21:33:37 +01:00
librustc_asan Remove licenses 2018-12-25 21:08:33 -07:00
librustc_borrowck Update link to rustc guide 2018-12-28 13:34:00 -05:00
librustc_codegen_llvm add support for principal-less trait object types 2019-01-04 00:34:52 +02:00
librustc_codegen_ssa Auto merge of #57145 - RalfJung:panic-if-uninhabited, r=alexcrichton 2019-01-05 14:58:57 +00:00
librustc_codegen_utils Remove licenses 2018-12-25 21:08:33 -07:00
librustc_cratesio_shim Remove licenses 2018-12-25 21:08:33 -07:00
librustc_data_structures flock: Use fcntl constants directly from libc crate on Unix targets 2019-01-06 11:58:13 +01:00
librustc_driver Make sure feature gate errors are recoverable (take 2) 2019-01-06 14:58:17 +03:00
librustc_errors Remove licenses 2018-12-25 21:08:33 -07:00
librustc_fs_util Remove licenses 2018-12-25 21:08:33 -07:00
librustc_incremental Remove licenses 2018-12-25 21:08:33 -07:00
librustc_lint Fix repeated word typos 2019-01-03 21:33:37 +01:00
librustc_llvm bootstrap: Link LLVM as a dylib with ThinLTO 2019-01-02 11:33:38 -08:00
librustc_lsan Remove licenses 2018-12-25 21:08:33 -07:00
librustc_metadata Store Ident rather than just Name in HIR types Item and ForeignItem. 2018-12-26 21:26:37 +00:00
librustc_mir Rollup merge of #57342 - phansch:make_public, r=Centril 2019-01-05 23:57:04 +08:00
librustc_msan Remove licenses 2018-12-25 21:08:33 -07:00
librustc_passes Do not abort compilation if expansion produces errors 2018-12-27 15:51:36 +03:00
librustc_platform_intrinsics Remove licenses 2018-12-25 21:08:33 -07:00
librustc_plugin Remove licenses 2018-12-25 21:08:33 -07:00
librustc_privacy Address review comments 2019-01-01 01:39:55 +03:00
librustc_resolve Fix repeated word typos 2019-01-03 21:33:37 +01:00
librustc_save_analysis Replace CrateAnalysis::access_levels with query 2019-01-04 19:12:48 +01:00
librustc_target Remove licenses 2018-12-25 21:08:33 -07:00
librustc_traits Auto merge of #56837 - arielb1:nonprincipal-trait-objects, r=nikomatsakis 2019-01-05 03:36:31 +00:00
librustc_tsan Remove licenses 2018-12-25 21:08:33 -07:00
librustc_typeck Auto merge of #57291 - euclio:method-call-suggestion, r=estebank 2019-01-06 10:30:05 +00:00
librustdoc Rollup merge of #57343 - Xanewok:querify-access-levels, r=nikomatsakis 2019-01-05 23:57:06 +08:00
libserialize Remove licenses 2018-12-25 21:08:33 -07:00
libstd Rollup merge of #57326 - king6cong:doc, r=rkruppe 2019-01-05 23:57:01 +08:00
libsyntax Make TokenStream less recursive. 2019-01-08 15:08:46 +11:00
libsyntax_ext Make TokenStream less recursive. 2019-01-08 15:08:46 +11:00
libsyntax_pos Remove licenses 2018-12-25 21:08:33 -07:00
libterm Remove licenses 2018-12-25 21:08:33 -07:00
libtest Bound sgx target_env with fortanix as target_vendor 2018-12-31 16:32:56 -08:00
libunwind Remove licenses 2018-12-25 21:08:33 -07:00
llvm@f4728ed8fa Update LLVM submodule 2018-12-18 15:26:10 +05:30
llvm-emscripten@7f23313edf Pull in fix for dist-i686-linux build 2018-11-09 16:59:45 +01:00
rtstartup Remove licenses 2018-12-25 21:08:33 -07:00
rustc rustc: Fix regression where jemalloc isn't used 2019-01-03 13:52:36 -08:00
rustllvm Remove licenses 2018-12-25 21:08:33 -07:00
stdsimd@ddb30221d7 Update the stdsimd submodule 2019-01-02 11:37:59 -08:00
test Auto merge of #57272 - petrochenkov:featrecov, r=estebank 2019-01-06 15:40:58 +00:00
tools Rollup merge of #57314 - wiktorkuchta:master, r=Centril 2019-01-05 23:56:59 +08:00
.gitignore
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
stage0.txt Bump to 1.33.0 2018-12-12 08:09:26 -08: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.

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