rust/compiler/rustc_session/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
..
cgu_reuse_tracker.rs Make Diagnostic::span_fatal unconditionally raise an error 2021-05-08 23:12:04 -04:00
code_stats.rs
config.rs rustc_session: Move more option building code from the options! macro 2021-05-10 14:41:45 +03:00
filesearch.rs Adjust target search algorithm for rustlib path 2021-05-10 19:15:19 +03:00
lib.rs Move SanitizerSet to rustc_target 2021-04-03 00:37:49 +03:00
options.rs Auto merge of #83129 - LeSeulArtichaut:thir-unsafeck, r=nikomatsakis 2021-05-13 10:49:29 +00:00
output.rs
parse.rs Implement span quoting for proc-macros 2021-05-12 00:51:31 -04:00
search_paths.rs
session.rs Auto merge of #83813 - cbeuw:remap-std, r=michaelwoerister 2021-05-12 11:05:56 +00:00
utils.rs Implement RFC 2951: Native link modifiers 2021-05-05 16:04:25 -07:00