rust/src
bors 09f4c9f508 Auto merge of #75255 - davidtwco:polymorphisation-symbol-mangling-v0-upvar-closures, r=lcnr
instance: polymorphize upvar closures/generators

This PR modifies how instances are polymorphized so that closures and generators have any closures or generators captured within their upvars also polymorphized.

With the new symbol mangling, a fully polymorphised closure will produce the same symbol regardless of what it was instantiated with. However, when that polymorphised closure captures another closure as an upvar, then the type of that other closure in the upvar substitution wouldn't have been polymorphised. The other closure will still refer to the initial substitutions. Therefore, the polymorphised closure will end up hashing differently but producing the same symbol - triggering `assert_symbols_are_distinct` in MIR partitioning. The old mangling scheme had a hash at the end that meant this didn't happen (this would still have been an issue, we just didn't have a way to notice).

See [this Zulip discussion for further elaboration](https://rust-lang.zulipchat.com/#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/symbol.20mangling.20v0.20.E2.9C.95.20polymorphisation/near/206152008).

r? @eddyb
cc @lcnr
2020-08-07 17:57:30 +00:00
..
bootstrap Auto merge of #75111 - mati865:use-lld-option, r=Mark-Simulacrum 2020-08-04 05:37:44 +00:00
build_helper build: Harden env var tracking in build scripts 2020-07-22 19:51:19 +03:00
ci ci: disable fail-fast on auto-fallible 2020-08-04 11:14:28 +02:00
doc Update books 2020-08-04 16:45:19 -07:00
etc Handle new HashMap layout in CDB, MSVC, WinDbg, etc. 2020-08-07 07:03:15 +01:00
librustc_apfloat
librustc_arena Rollup merge of #73378 - matthewjasper:arena-not-special, r=oli-obk 2020-06-20 14:45:00 -07:00
librustc_ast rustc_expand: Don not beautify doc comments before passing them to macros 2020-08-06 22:13:11 +03:00
librustc_ast_lowering Auto merge of #74627 - petrochenkov:docbeauty2, r=Aaron1011 2020-08-07 13:29:25 +00:00
librustc_ast_passes rustc_ast: (Nested)MetaItem::check_name -> has_name 2020-08-04 00:34:11 +03:00
librustc_ast_pretty rustc_ast/comments: Modernize some enum reexports 2020-08-06 22:13:11 +03:00
librustc_attr rustc_ast: (Nested)MetaItem::check_name -> has_name 2020-08-04 00:34:11 +03:00
librustc_builtin_macros rustc_ast: (Nested)MetaItem::check_name -> has_name 2020-08-04 00:34:11 +03:00
librustc_codegen_llvm Auto merge of #75037 - richkadel:llvm-coverage-map-gen-5.2, r=wesleywiser 2020-08-05 05:08:19 +00:00
librustc_codegen_ssa Auto merge of #75037 - richkadel:llvm-coverage-map-gen-5.2, r=wesleywiser 2020-08-05 05:08:19 +00:00
librustc_data_structures Move from log to tracing 2020-07-31 22:38:20 +02:00
librustc_driver Remove chrono feature from tracing 2020-08-01 16:24:52 +02:00
librustc_error_codes Rollup merge of #75217 - GuillaumeGomez:cleanup-e0747, r=Dylan-DPC 2020-08-07 09:35:28 +09:00
librustc_errors Show backtrace numbers in backtrace whenever more than one is involved 2020-08-05 11:05:12 -04:00
librustc_expand rustc_expand: Don not beautify doc comments before passing them to macros 2020-08-06 22:13:11 +03:00
librustc_feature Fix typo in librustc_feature/active.rs 2020-08-05 11:02:47 +03:00
librustc_fs_util
librustc_graphviz
librustc_hir Give a much better error message if the struct failed to resolve 2020-08-05 00:20:34 -04:00
librustc_hir_pretty Remove lots of Symbol::as_str() calls. 2020-07-15 09:01:35 +10:00
librustc_incremental Change the type of AssertModuleSource::available_cgus. 2020-08-07 06:58:14 +10:00
librustc_index mir: use FiniteBitSet<u32> in polymorphization 2020-08-04 18:30:53 +01:00
librustc_infer Auto merge of #74969 - nnethercote:rm-GCX_PTR, r=Mark-Simulacrum 2020-08-03 01:50:25 +00:00
librustc_interface Remove setup_callbacks_and_run_in_default_thread_pool_with_globals(). 2020-08-05 10:42:45 +10:00
librustc_lexer Rollup merge of #73856 - pierwill:pierwill-lexer-doc, r=jonas-schievink 2020-07-06 17:45:17 -07:00
librustc_lint Rollup merge of #75083 - JohnTitor:follow-up-unused-braces, r=lcnr 2020-08-04 09:27:04 +09:00
librustc_llvm Rollup merge of #74643 - petrochenkov:noenvrerun, r=Mark-Simulacrum 2020-07-22 16:34:50 -07:00
librustc_macros Enforce the static symbol order. 2020-07-16 16:53:24 +10:00
librustc_metadata Record query name when profiling "metadata_decode_entry" 2020-08-06 09:33:34 -04:00
librustc_middle instance: polymorphize FnDef substs 2020-08-07 18:41:45 +01:00
librustc_mir Auto merge of #74821 - oli-obk:const_eval_read_uninit_fast_path, r=wesleywiser 2020-08-07 15:28:07 +00:00
librustc_mir_build fix typos 2020-08-02 23:20:00 +08:00
librustc_parse Add some comments for magic numbers + Add tests 2020-08-06 22:55:26 +03:00
librustc_parse_format Eliminate confusing "globals" terminology. 2020-07-09 14:11:44 +10:00
librustc_passes rustc_ast: (Nested)MetaItem::check_name -> has_name 2020-08-04 00:34:11 +03:00
librustc_plugin_impl rustc_metadata: Make crate loading fully speculative 2020-07-18 14:06:04 +04:00
librustc_privacy Rollup merge of #75022 - cuviper:sliced-rchunk, r=lcnr 2020-08-01 17:42:18 -07:00
librustc_query_system Auto merge of #75055 - cjgillot:clean-cache, r=oli-obk 2020-08-03 03:37:33 +00:00
librustc_resolve Handle fieldless tuple structs in diagnostic code 2020-08-05 07:59:26 -04:00
librustc_save_analysis rustc_expand: Don not beautify doc comments before passing them to macros 2020-08-06 22:13:11 +03:00
librustc_serialize
librustc_session Rollup merge of #75059 - shengsheng:typos, r=Dylan-DPC 2020-08-02 13:08:47 -07:00
librustc_span fix typos 2020-08-02 23:20:00 +08:00
librustc_symbol_mangling Move from log to tracing 2020-07-31 22:38:20 +02:00
librustc_target Remove the --no-threads workaround for wasm targets. 2020-08-04 13:31:08 -07:00
librustc_trait_selection Fix typo "TraitObligatiom" -> "TraitObligation" 2020-08-06 14:37:32 -07:00
librustc_traits Move from log to tracing 2020-07-31 22:38:20 +02:00
librustc_ty Move from log to tracing 2020-07-31 22:38:20 +02:00
librustc_typeck Auto merge of #75037 - richkadel:llvm-coverage-map-gen-5.2, r=wesleywiser 2020-08-05 05:08:19 +00:00
librustdoc Auto merge of #74627 - petrochenkov:docbeauty2, r=Aaron1011 2020-08-07 13:29:25 +00:00
llvm-project@86b120e6f3 Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix 2020-07-12 18:49:14 +00:00
rustc
rustllvm Fixed coverage map issues; better aligned with LLVM APIs 2020-07-25 07:39:51 -07:00
test Auto merge of #75255 - davidtwco:polymorphisation-symbol-mangling-v0-upvar-closures, r=lcnr 2020-08-07 17:57:30 +00:00
tools Auto merge of #74821 - oli-obk:const_eval_read_uninit_fast_path, r=wesleywiser 2020-08-07 15:28:07 +00:00
README.md Update outdated readme 2020-07-27 22:05:34 -05:00
stage0.txt Bump to 1.47 2020-07-16 19:36:49 -04:00

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

  • rustc and its tests
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

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