rust/src
bors abaa9344d4 Auto merge of #56805 - mikeyhew:stabilize-pin-as-receiver, r=nikomatsakis
Stabilize `Rc`, `Arc` and `Pin` as method receivers

Replaces #55880
Closes  #55786
r? @nikomatsakis
cc @withoutboats @cramertj

This lets you write methods using `self: Rc<Self>`, `self: Arc<Self>`, `self: Pin<&mut Self>`, `self: Pin<Box<Self>`, and other combinations involving `Pin` and another stdlib receiver type, without needing the `arbitrary_self_types`. Other user-created receiver types can be used, but they still require the feature flag to use.

This is implemented by introducing a new trait, `Receiver`, which the method receiver's type must implement if the `arbitrary_self_types` feature is not enabled. To keep composed receiver types such as `&Arc<Self>` unstable, the receiver type is also required to implement `Deref<Target=Self>` when the feature flag is not enabled.

This lets you use `self: Rc<Self>` and `self: Arc<Self>` in stable Rust, which was not allowed previously. It was agreed that they would be stabilized in #55786. `self: Pin<&Self>` and other pinned receiver types do not require the `arbitrary_self_types` feature, but they cannot be used on stable because `Pin` still requires the `pin` feature.
2018-12-22 01:42:25 +00:00
..
bootstrap Rollup merge of #56947 - hsivonen:neon, r=alexcrichton 2018-12-19 11:47:20 +01:00
build_helper std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
ci Rollup merge of #56947 - hsivonen:neon, r=alexcrichton 2018-12-19 11:47:20 +01:00
doc Fixes broken links 2018-12-14 10:40:08 +01:00
etc Disable btree pretty-printers on older gdbs 2018-12-12 15:18:08 -07:00
grammar syntax: Rename some keywords 2018-12-04 00:30:27 +03:00
liballoc Stabilize Rc, Arc and Pin as method receivers 2018-12-20 01:14:01 -05:00
libarena Auto merge of #56378 - ljedrz:arena_tweaks, r=nagisa 2018-12-02 11:14:14 +00:00
libbacktrace@f4d02bbdbf
libcore Stabilize Rc, Arc and Pin as method receivers 2018-12-20 01:14:01 -05:00
libfmt_macros remove padding from multiline format string label 2018-10-03 14:29:39 -04:00
libgraphviz Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
libpanic_abort std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
libpanic_unwind std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
libproc_macro proc_macro: Validate tokens coming from the compiler again 2018-12-19 23:17:53 +03:00
libprofiler_builtins std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc Auto merge of #56805 - mikeyhew:stabilize-pin-as-receiver, r=nikomatsakis 2018-12-22 01:42:25 +00:00
librustc_allocator Upgrade smallvec to 0.6.7 and use the new may_dangle feature. 2018-12-10 09:31:27 +11:00
librustc_apfloat Upgrade smallvec to 0.6.7 and use the new may_dangle feature. 2018-12-10 09:31:27 +11:00
librustc_asan std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc_borrowck Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_codegen_llvm Auto merge of #56397 - petrhosek:file-search, r=cramertj 2018-12-19 06:46:15 +00:00
librustc_codegen_ssa treat ref-to-raw cast like a reborrow: do a special kind of retag 2018-12-18 09:56:31 +01:00
librustc_codegen_utils Auto merge of #56578 - alexreg:cosmetic-1, r=alexreg 2018-12-08 03:50:16 +00:00
librustc_cratesio_shim Statically link proc_macro into proc macros. 2018-11-30 06:15:20 +02:00
librustc_data_structures Tweak query code for performance 2018-12-17 08:53:01 +01:00
librustc_driver Auto merge of #56813 - oli-obk:main_🧶, r=pnkfelix 2018-12-21 10:46:11 +00:00
librustc_errors Bump to 1.33.0 2018-12-12 08:09:26 -08:00
librustc_fs_util Rename conversion util; remove duplicate util in librustc_codegen_llvm. 2018-11-29 08:09:28 -05:00
librustc_incremental Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_lint Rollup merge of #56689 - QuietMisdreavus:rustdoc-lint-group, r=pnkfelix 2018-12-19 11:47:07 +01:00
librustc_llvm Bump to 1.33.0 2018-12-12 08:09:26 -08:00
librustc_lsan std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc_metadata Remove Session::sysroot(). 2018-12-12 10:36:15 +11:00
librustc_mir Auto merge of #54125 - varkor:less-conservative-uninhabitedness-check, r=nikomatsakis 2018-12-20 22:04:21 +00:00
librustc_msan std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc_passes Rollup merge of #56343 - yui-knk:remove_mir_stats_mod, r=nikomatsakis 2018-12-16 14:08:15 +01:00
librustc_platform_intrinsics
librustc_plugin Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_privacy Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_resolve Reintroduce special pretty-printing for $crate when it's necessary for proc macros 2018-12-19 23:17:54 +03:00
librustc_save_analysis Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_target Rollup merge of #56947 - hsivonen:neon, r=alexcrichton 2018-12-19 11:47:20 +01:00
librustc_traits add coherence future-compat warnings for marker-only trait objects 2018-12-14 19:14:22 +02:00
librustc_tsan std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc_typeck Auto merge of #56805 - mikeyhew:stabilize-pin-as-receiver, r=nikomatsakis 2018-12-22 01:42:25 +00:00
librustdoc Auto merge of #55798 - GuillaumeGomez:version-display-associated-const, r=QuietMisdreavus 2018-12-21 01:58:16 +00:00
libserialize Bump to 1.33.0 2018-12-12 08:09:26 -08:00
libstd Auto merge of #56779 - adrian-budau:master, r=alexcrichton 2018-12-21 20:08:11 +00:00
libsyntax Auto merge of #56647 - petrochenkov:dcrate2, r=alexcrichton 2018-12-20 12:42:54 +00:00
libsyntax_ext proc_macro: Accept $crate as an identifier if it comes from the compiler 2018-12-19 23:17:53 +03:00
libsyntax_pos Reintroduce special pretty-printing for $crate when it's necessary for proc macros 2018-12-19 23:17:54 +03:00
libterm Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
libtest Auto merge of #56243 - RalfJung:test-deterministic, r=alexcrichton 2018-12-11 14:04:15 +00:00
libunwind std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08: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 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
rustc std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
rustllvm Auto merge of #56642 - nikic:llvm-6, r=alexcrichton 2018-12-17 04:18:14 +00:00
stdsimd@3c0503db84 Update the stdsimd submodule 2018-12-10 12:05:33 -08:00
test Auto merge of #56805 - mikeyhew:stabilize-pin-as-receiver, r=nikomatsakis 2018-12-22 01:42:25 +00:00
tools Rollup merge of #56947 - hsivonen:neon, r=alexcrichton 2018-12-19 11:47:20 +01: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: