rust/src
bors 17b60b8738 Auto merge of #83129 - LeSeulArtichaut:thir-unsafeck, r=nikomatsakis
Introduce the beginning of a THIR unsafety checker

This poses the foundations for the THIR unsafety checker, so that it can be implemented incrementally:
- implements a rudimentary `Visitor` for the THIR (which will definitely need some tweaking in the future)
- introduces a new `-Zthir-unsafeck` flag which tells the compiler to use THIR unsafeck instead of MIR unsafeck
- implements detection of unsafe functions
- adds revisions to the UI tests to test THIR unsafeck alongside MIR unsafeck

This uses a very simple query design, where bodies are unsafety-checked on a body per body basis. This however has some big flaws:
- the unsafety-checker builds the THIR itself, which means a lot of work is duplicated with MIR building constructing its own copy of the THIR
- unsafety-checking closures is currently completely wrong: closures should take into account the "safety context" in which they are created, here we are considering that closures are always a safe context

I had intended to fix these problems in follow-up PRs since they are always gated under the `-Zthir-unsafeck` flag (which is explicitely noted to be unsound).

r? `@nikomatsakis`
cc https://github.com/rust-lang/project-thir-unsafeck/issues/3 https://github.com/rust-lang/project-thir-unsafeck/issues/7
2021-05-13 10:49:29 +00:00
..
bootstrap Rollup merge of #85191 - GuillaumeGomez:improve-rustdoc-gui-tester, r=Mark-Simulacrum 2021-05-12 07:18:05 +09:00
build_helper
ci update perf version used for PGO 2021-05-10 14:39:28 +02:00
doc Auto merge of #84732 - DrChat:asm_powerpc, r=Amanieu 2021-05-13 05:40:55 +00:00
etc Fix HashMap/HashSet LLDB pretty-printer after hashbrown 0.11.0 2021-04-06 12:44:17 +03:00
librustdoc Rollup merge of #85174 - GuillaumeGomez:doc-code-block-border-radius, r=jsha 2021-05-12 17:19:29 +02:00
llvm-project@c78cf18a07 Update LLVM submodule 2021-05-08 11:01:09 +02:00
rustdoc-json-types rustdoc-json: Rename Import.span to Import.source 2021-03-21 19:47:12 -07:00
test Auto merge of #83129 - LeSeulArtichaut:thir-unsafeck, r=nikomatsakis 2021-05-13 10:49:29 +00:00
tools Auto merge of #83129 - LeSeulArtichaut:thir-unsafeck, r=nikomatsakis 2021-05-13 10:49:29 +00:00
README.md update message 2021-02-14 10:08:37 +05:30
stage0.txt Bump bootstrap compiler 2021-04-06 18:24:09 -07:00
version bump version to 1.54.0 2021-04-30 15:24:00 +02:00

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

  • The test suite
  • 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.