rust/src
bors 49317cd511 Auto merge of #49130 - smmalis37:range, r=alexcrichton
Move Range*::contains to a single default impl on RangeBounds

Per the ongoing discussion in #32311.

This is my first PR to Rust (woo!), so I don't know if this requires an amendment to the original range_contains RFC, or not, or if we can just do a psuedo-RFC here. While this may no longer follow the explicit decision made in that RFC, I believe this better follows its spirit by adding the new contains method to all Ranges. It also allows users to be generic over all ranges and use this method without writing it themselves (my personal desired use case).

This also somewhat answers the unanswered question about Wrapping ranges in the above issue by instead just punting it to the question of what those types should return for start() & end(), or if they should implement RangeArgument at all. Those types could also implement their own contains method without implementing this trait, in which case the question remains the same.

This does add a new contains method to types that already implemented RangeArgument but not contains. These types are RangeFull, (Bound<T>, Bound<T>), (Bound<&'a T>, Bound<&'a T>). No tests have been added for these types yet. No inherent method has been added either.

r? @alexcrichton
2018-04-16 16:07:10 +00:00
..
bootstrap Rollup merge of #49922 - f-bro:zmiri, r=oli-obk 2018-04-14 15:23:37 +08:00
build_helper Run rustfmt on build_helper 2018-04-12 14:49:03 +09:00
ci Rollup merge of #49866 - Mark-Simulacrum:pr-travis-windows, r=alexcrichton 2018-04-14 15:21:39 +08:00
dlmalloc@c99638dc2e Update to most recent version of dlmalloc 2018-04-12 22:53:02 +02:00
doc Auto merge of #49956 - QuietMisdreavus:rustdoc-codegen, r=GuillaumeGomez 2018-04-16 05:00:14 +00:00
etc Auto merge of #49881 - varkor:partialord-opt, r=Manishearth 2018-04-15 03:54:15 +00:00
grammar Remove all unstable placement features 2018-04-03 11:02:34 +02:00
jemalloc@1f5a28755e
liballoc Auto merge of #48945 - clarcharr:iter_exhaust, r=Kimundi 2018-04-16 13:21:56 +00:00
liballoc_jemalloc Restore Global.oom() functionality 2018-04-12 22:53:21 +02:00
liballoc_system Rename alloc::Void to alloc::Opaque 2018-04-12 22:53:22 +02:00
libarena Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
libbacktrace fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}} 2018-02-10 12:22:57 +01:00
libcompiler_builtins@2a2f6d96c8 Update compiler-rt with fix for 32bit iOS ARM 2018-03-27 15:32:06 +02:00
libcore Auto merge of #49130 - smmalis37:range, r=alexcrichton 2018-04-16 16:07:10 +00:00
libfmt_macros Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
libgraphviz Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
liblibc@a7e78a78e1 Update liblibc submodule to the 0.2.40 release 2018-03-26 23:42:30 -04:00
libpanic_abort Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
libpanic_unwind Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
libproc_macro Rollup merge of #49734 - alexcrichton:generalize-token-stream, r=nikomatsakis 2018-04-12 03:37:12 +08:00
libprofiler_builtins Inject the compiler_builtins crate whenever the core crate is injected 2018-04-07 09:24:35 +02:00
librustc Auto merge of #49433 - varkor:metadata-skip-mir-opt, r=michaelwoerister 2018-04-16 10:30:57 +00:00
librustc_allocator Rename alloc::Void to alloc::Opaque 2018-04-12 22:53:22 +02:00
librustc_apfloat Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
librustc_asan Inject the compiler_builtins crate whenever the core crate is injected 2018-04-07 09:24:35 +02:00
librustc_back Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
librustc_borrowck Avoid comparing fields by name when possible 2018-04-12 23:06:03 +03:00
librustc_const_math Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
librustc_cratesio_shim
librustc_data_structures Auto merge of #48945 - clarcharr:iter_exhaust, r=Kimundi 2018-04-16 13:21:56 +00:00
librustc_driver Auto merge of #49433 - varkor:metadata-skip-mir-opt, r=michaelwoerister 2018-04-16 10:30:57 +00:00
librustc_errors Auto merge of #49130 - smmalis37:range, r=alexcrichton 2018-04-16 16:07:10 +00:00
librustc_incremental Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
librustc_lint Avoid comparing fields by name when possible 2018-04-12 23:06:03 +03:00
librustc_llvm Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
librustc_lsan Inject the compiler_builtins crate whenever the core crate is injected 2018-04-07 09:24:35 +02:00
librustc_metadata Auto merge of #49433 - varkor:metadata-skip-mir-opt, r=michaelwoerister 2018-04-16 10:30:57 +00:00
librustc_mir Auto merge of #49130 - smmalis37:range, r=alexcrichton 2018-04-16 16:07:10 +00:00
librustc_msan Inject the compiler_builtins crate whenever the core crate is injected 2018-04-07 09:24:35 +02:00
librustc_passes AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00
librustc_platform_intrinsics Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
librustc_plugin Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
librustc_privacy Avoid comparing fields by name when possible 2018-04-12 23:06:03 +03:00
librustc_resolve Auto merge of #49847 - sinkuu:save_analysis_implicit_extern, r=petrochenkov 2018-04-16 02:34:32 +00:00
librustc_save_analysis Auto merge of #49847 - sinkuu:save_analysis_implicit_extern, r=petrochenkov 2018-04-16 02:34:32 +00:00
librustc_traits Auto merge of #49800 - ishitatsuyuki:intern-goal, r=nikomatsakis 2018-04-13 13:09:40 +00:00
librustc_trans Auto merge of #49833 - oli-obk:incremental_miri_regression, r=michaelwoerister 2018-04-15 12:32:13 +00:00
librustc_trans_utils Auto merge of #49558 - Zoxc:sync-misc, r=michaelwoerister 2018-04-12 16:22:36 +00:00
librustc_tsan Inject the compiler_builtins crate whenever the core crate is injected 2018-04-07 09:24:35 +02:00
librustc_typeck Rollup merge of #49913 - varkor:RegionParameterDef-InternedString, r=petrochenkov 2018-04-14 15:22:57 +08:00
librustdoc Auto merge of #49956 - QuietMisdreavus:rustdoc-codegen, r=GuillaumeGomez 2018-04-16 05:00:14 +00:00
libserialize Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
libstd Auto merge of #48945 - clarcharr:iter_exhaust, r=Kimundi 2018-04-16 13:21:56 +00:00
libstd_unicode Mark the rest of the unicode feature flag as perma-unstable. 2018-04-12 00:13:53 +02:00
libsyntax Auto merge of #49719 - mark-i-m:no_sep, r=petrochenkov 2018-04-16 00:06:10 +00:00
libsyntax_ext Auto merge of #49881 - varkor:partialord-opt, r=Manishearth 2018-04-15 03:54:15 +00:00
libsyntax_pos Auto merge of #49371 - scottmcm:catch-wrapping, r=nikomatsakis 2018-04-12 05:38:49 +00:00
libterm Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
libtest Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
libunwind Move deny(warnings) into rustbuild 2018-04-08 16:59:14 -06:00
llvm@7243155b1c Use the GlobalAlloc trait for #[global_allocator] 2018-04-12 22:53:12 +02:00
llvm-emscripten@2717444753 rustc: Split Emscripten to a separate codegen backend 2018-01-28 18:32:45 -08:00
rtstartup
rustc Update to most recent version of dlmalloc 2018-04-12 22:53:02 +02:00
rustllvm Use the GlobalAlloc trait for #[global_allocator] 2018-04-12 22:53:12 +02:00
stdsimd@bcb720e558 update stdsimd 2018-03-21 15:43:06 -05:00
test Auto merge of #49956 - QuietMisdreavus:rustdoc-codegen, r=GuillaumeGomez 2018-04-16 05:00:14 +00:00
tools Rollup merge of #49951 - matklad:update-cargo, r=nrc 2018-04-14 15:21:10 +08:00
Cargo.lock Update Rustfmt 2018-04-14 13:33:28 +12:00
Cargo.toml Revert "create a nostd crate" 2018-04-04 22:23:33 +02:00
README.md Start moving to the rustc guide! 2018-02-23 13:20:56 -06:00
stage0.txt Bump the bootstrap compiler to 1.26.0 beta 2018-04-05 07:13:45 -07: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: