rust/src
Pietro Albini d5643be9b4
Rollup merge of #61488 - matthewjasper:fix-nll-typeck-ices, r=pnkfelix
Fix NLL typeck ICEs

* Don't ICE when a type containing a region is constrained by nothing
* Don't ICE trying to normalize a type in a `ParamEnv` containing global bounds.

To explain what was happening in the `issue-61311-normalize.rs` case:

* When borrow checking the `the_fn` in the last `impl` we would try to normalize `Self::Proj` (`<Unit as HasProjFn>::Proj`).
* We would find the `impl` that we're checking and and check its `where` clause.
* This would need us to check `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`
* We find two possible implementations, the blanket impl and the bound in our `ParamEnv`.
* The bound in our `ParamEnv` was canonicalized, so we don't see it as a global bound. As such we prefer it to the `impl`.
* This means that we cannot normalize `<Box<dyn Obj + 'static> as HasProj>::Proj` to `Unit`.
* The `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound` bound, which looks like it should be in our `ParamEnv` has been normalized to `Unit: Bound`.
* We fail to prove `<Box<dyn Obj + 'static> as HasProj>::Proj: Bound`.
* We ICE, since we believe typeck have errored.

Closes #61311
Closes #61315
Closes #61320

r? @pnkfelix
cc @nikomatsakis
2019-06-04 22:39:38 +02:00
..
bootstrap Treat 0 as special value for codegen-units-std 2019-06-03 12:57:29 -06:00
build_helper Bump compiler-builtins to 0.1.15 2019-05-22 07:46:36 -07:00
ci ci: Reenable step timings on AppVeyor 2019-06-03 07:50:03 -07:00
doc Rollup merge of #61372 - mati865:books, r=Centril,GuillaumeGomez 2019-05-31 13:34:06 +02:00
etc Fix .natvis visualizers. 2019-05-09 16:15:43 -07:00
grammar
liballoc Rollup merge of #61420 - felixrabe:patch-2, r=dtolnay 2019-06-04 04:48:16 +02:00
libarena Optimize alloc_from_iter 2019-05-23 18:51:46 +02:00
libcore Remove unneeded feature attr from atomic integers doctests 2019-06-04 13:24:39 +00:00
libfmt_macros review comments 2019-05-24 11:50:21 -07:00
libgraphviz
libpanic_abort
libpanic_unwind
libproc_macro
libprofiler_builtins Ship profiler with windows-gnu 2019-05-23 13:32:30 +02:00
librustc Rollup merge of #61488 - matthewjasper:fix-nll-typeck-ices, r=pnkfelix 2019-06-04 22:39:38 +02:00
librustc_allocator Avoid unnecessary internings. 2019-05-27 13:58:38 +10:00
librustc_apfloat ignore-tidy-filelength on all files with greater than 3000 lines 2019-04-25 21:39:09 +01:00
librustc_asan
librustc_borrowck rustc: track the body owner DefId in MC and EUV. 2019-06-01 19:17:23 +03:00
librustc_codegen_llvm Auto merge of #59148 - lcnr:unchecked_maths, r=eddyb 2019-06-03 22:05:55 +00:00
librustc_codegen_ssa Auto merge of #59148 - lcnr:unchecked_maths, r=eddyb 2019-06-03 22:05:55 +00:00
librustc_codegen_utils remove unneeded deps 2019-06-02 22:56:37 -05:00
librustc_cratesio_shim
librustc_data_structures rustc: use indexmap instead of a plain vector for upvars. 2019-06-01 19:17:22 +03:00
librustc_driver Declare DefIndex with the newtype_index macro 2019-05-18 13:19:33 +02:00
librustc_errors librustc_errors: Move annotation collection to own impl 2019-05-28 08:34:44 +02:00
librustc_fs_util
librustc_incremental Pass a Symbol to check_name, emit_feature_err, and related functions. 2019-05-13 09:29:22 +10:00
librustc_interface rustc: collect upvars from HIR, instead of during name resolution. 2019-06-01 20:44:05 +03:00
librustc_lint Auto merge of #61100 - varkor:must_use-tuple-expr, r=cramertj 2019-06-03 19:12:17 +00:00
librustc_llvm
librustc_lsan
librustc_macros Rollup merge of #60885 - euclio:strip-synstructure-consts, r=GuillaumeGomez 2019-05-29 14:41:03 +02:00
librustc_metadata Rollup merge of #61389 - Zoxc:arena-cleanup, r=eddyb 2019-06-01 06:50:07 +02:00
librustc_mir Rollup merge of #61488 - matthewjasper:fix-nll-typeck-ices, r=pnkfelix 2019-06-04 22:39:38 +02:00
librustc_msan
librustc_passes syntax: revert ast::AsyncArgument and associated changes. 2019-06-03 10:20:35 +01:00
librustc_plugin Reword malformed attribute input diagnostics 2019-05-25 11:55:50 -07:00
librustc_privacy rustc: async fn drop order lowering in HIR 2019-06-03 10:20:35 +01:00
librustc_resolve syntax: revert ast::AsyncArgument and associated changes. 2019-06-03 10:20:35 +01:00
librustc_save_analysis syntax: revert ast::AsyncArgument and associated changes. 2019-06-03 10:20:35 +01:00
librustc_target Add to_symbol methods. 2019-05-27 14:05:02 +10:00
librustc_traits Rename OpportunisticTypeResolver to OpportunisticVarResolver 2019-05-28 21:34:42 +01:00
librustc_tsan
librustc_typeck Rollup merge of #61444 - estebank:const-pt-as-ref, r=matthewjasper 2019-06-04 04:48:19 +02:00
librustdoc Rollup merge of #61413 - davidtwco:async-argument-order-in-a-sane-way, r=eddyb 2019-06-04 04:48:11 +02:00
libserialize rustc: use indexmap instead of a plain vector for upvars. 2019-06-01 19:17:22 +03:00
libstd Fix missing semicolon in doc 2019-06-02 10:23:33 +02:00
libsyntax Rollup merge of #61413 - davidtwco:async-argument-order-in-a-sane-way, r=eddyb 2019-06-04 04:48:11 +02:00
libsyntax_ext syntax: revert ast::AsyncArgument and associated changes. 2019-06-03 10:20:35 +01:00
libsyntax_pos Add HygieneData::{outer,expn_info,is_descendant_of} methods. 2019-05-30 08:59:22 +10:00
libterm
libtest Make "panic did not include expected string" message consistent 2019-05-30 21:58:33 +01:00
libunwind Set -funwind-tables and -fno-exceptions unconditionally for LLVM's libunwind 2019-05-20 12:29:58 -07:00
llvm-emscripten@7f23313edf
llvm-project@788592fb27 Update LLVM 2019-05-31 00:49:06 +01:00
rtstartup
rustc
rustllvm Limit internalization in LLVM 8 ThinLTO 2019-04-26 08:58:14 -07:00
stdsimd@4bf456c35e
test Rollup merge of #61488 - matthewjasper:fix-nll-typeck-ices, r=pnkfelix 2019-06-04 22:39:38 +02:00
tools Auto merge of #61510 - Centril:rollup-bvi95y2, r=Centril 2019-06-04 05:37:44 +00:00
.gitignore
README.md
stage0.txt bump nightly to 1.37.0 2019-05-23 12:27:58 +02: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: