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 |
||
|---|---|---|
| .. | ||
| bootstrap | ||
| build_helper | ||
| ci | ||
| doc | ||
| etc | ||
| grammar | ||
| liballoc | ||
| libarena | ||
| libcore | ||
| libfmt_macros | ||
| libgraphviz | ||
| libpanic_abort | ||
| libpanic_unwind | ||
| libproc_macro | ||
| libprofiler_builtins | ||
| librustc | ||
| librustc_allocator | ||
| librustc_apfloat | ||
| librustc_asan | ||
| librustc_borrowck | ||
| librustc_codegen_llvm | ||
| librustc_codegen_ssa | ||
| librustc_codegen_utils | ||
| librustc_cratesio_shim | ||
| librustc_data_structures | ||
| librustc_driver | ||
| librustc_errors | ||
| librustc_fs_util | ||
| librustc_incremental | ||
| librustc_interface | ||
| librustc_lint | ||
| librustc_llvm | ||
| librustc_lsan | ||
| librustc_macros | ||
| librustc_metadata | ||
| librustc_mir | ||
| librustc_msan | ||
| librustc_passes | ||
| librustc_plugin | ||
| librustc_privacy | ||
| librustc_resolve | ||
| librustc_save_analysis | ||
| librustc_target | ||
| librustc_traits | ||
| librustc_tsan | ||
| librustc_typeck | ||
| librustdoc | ||
| libserialize | ||
| libstd | ||
| libsyntax | ||
| libsyntax_ext | ||
| libsyntax_pos | ||
| libterm | ||
| libtest | ||
| libunwind | ||
| llvm-emscripten@7f23313edf | ||
| llvm-project@788592fb27 | ||
| rtstartup | ||
| rustc | ||
| rustllvm | ||
| stdsimd@4bf456c35e | ||
| test | ||
| tools | ||
| .gitignore | ||
| README.md | ||
| stage0.txt | ||
This directory contains the source code of the rust project, including:
rustcand its testslibstd- 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:
- https://github.com/rust-lang/rust/tree/master/src/librustc/ty/query
- https://github.com/rust-lang/rust/tree/master/src/librustc/dep_graph
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/higher_ranked
- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve