rust/compiler
bors 30a0a9b694 Auto merge of #86977 - vakaras:body_with_borrowck_facts, r=nikomatsakis
Enable compiler consumers to obtain mir::Body with Polonius facts.

This PR adds a function (``get_body_with_borrowck_facts``) that can be used by compiler consumers to obtain ``mir::Body`` with accompanying borrow checker information.

The most important borrow checker information that [our verifier called Prusti](https://github.com/viperproject/prusti-dev) needs is lifetime constraints. I have not found a reasonable way to compute the lifetime constraints on the Prusti side. In the compiler, the constraints are computed during the borrow checking phase and then dropped. This PR adds an additional parameter to the `do_mir_borrowck` function that tells it to return the computed information instead of dropping it.

The additionally returned information by `do_mir_borrowck` contains a ``mir::Body`` with non-erased lifetime regions and Polonius facts. I have decided to reuse the Polonius facts because this way I needed fewer changes to the compiler and Polonius facts contains other useful information that we otherwise would need to recompute.

Just FYI: up to now, Prusti was obtaining this information by [parsing the compiler logs](b58ced8dfd/prusti-interface/src/environment/borrowck/regions.rs (L25-L39)). This is not only a hacky approach, but we also reached its limits.

r? `@nikomatsakis`
2021-08-17 19:08:31 +00:00
..
rustc rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_apfloat rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_arena rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_ast Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_ast_lowering Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_ast_passes Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_ast_pretty Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_attr rustc: Fill out remaining parts of C-unwind ABI 2021-08-03 07:06:19 -07:00
rustc_builtin_macros Auto merge of #87581 - Amanieu:asm_clobber_abi, r=nagisa 2021-08-14 22:29:27 +00:00
rustc_codegen_cranelift Update rustc_codegen_cratelift for working_dir change 2021-08-15 15:17:37 -05:00
rustc_codegen_llvm Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_codegen_ssa Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
rustc_data_structures Remove duplicate trait bounds in rustc_data_structures::graph 2021-08-09 08:52:04 -05:00
rustc_driver Reduce verbosity of RUSTC_LOG 2021-08-09 21:39:39 -04:00
rustc_error_codes Rollup merge of #87700 - kornelski:e530text, r=oli-obk 2021-08-11 04:18:36 +09:00
rustc_errors Modify structured suggestion output 2021-08-11 09:46:24 +00:00
rustc_expand Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_feature feature gate doc(primitive) 2021-08-16 05:41:16 +00:00
rustc_fs_util rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_graphviz rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_hir Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_hir_pretty Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_incremental rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_index rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_infer Rollup merge of #88030 - fee1-dead:fixme, r=oli-obk 2021-08-16 23:37:30 +02:00
rustc_interface Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
rustc_lexer Renamed variable str -> tail for clarity 2021-08-11 13:57:28 +02:00
rustc_lint Auto merge of #88083 - m-ou-se:non-fmt-panics-suggest-debug, r=estebank 2021-08-17 16:43:40 +00:00
rustc_lint_defs Auto merge of #87324 - asquared31415:named-asm-labels, r=Amanieu 2021-08-14 17:33:38 +00:00
rustc_llvm Auto merge of #87798 - durin42:llvm-14, r=nikic 2021-08-08 04:33:22 +00:00
rustc_macros Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_metadata Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_middle Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_mir Auto merge of #86977 - vakaras:body_with_borrowck_facts, r=nikomatsakis 2021-08-17 19:08:31 +00:00
rustc_mir_build Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_parse Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_parse_format rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_passes Auto merge of #87050 - jyn514:no-doc-primitive, r=manishearth 2021-08-16 15:36:44 +00:00
rustc_plugin_impl Replace #[plugin_registrar] with exporting __rustc_plugin_registrar 2021-08-10 14:20:48 +02:00
rustc_privacy move Constness into TraitPredicate 2021-08-13 09:26:33 +00:00
rustc_query_impl Auto merge of #87515 - crlf0710:trait_upcasting_part2, r=bjorn3 2021-08-03 16:58:56 +00:00
rustc_query_system Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
rustc_resolve Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
rustc_save_analysis Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_serialize rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_session Include (potentially remapped) working dir in crate hash 2021-08-15 15:17:37 -05:00
rustc_span Auto merge of #87050 - jyn514:no-doc-primitive, r=manishearth 2021-08-16 15:36:44 +00:00
rustc_symbol_mangling Auto merge of #85296 - bjorn3:plugin_cleanup, r=petrochenkov 2021-08-12 04:30:41 +00:00
rustc_target Auto merge of #87581 - Amanieu:asm_clobber_abi, r=nagisa 2021-08-14 22:29:27 +00:00
rustc_trait_selection Auto merge of #87668 - estebank:tweak-bound-output, r=oli-obk 2021-08-17 06:59:49 +00:00
rustc_traits Assign FIXMEs to me and remove obsolete ones 2021-08-14 16:48:01 +00:00
rustc_ty_utils rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_type_ir rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_typeck Use multi span suggestions for closure migrations. 2021-08-16 11:38:28 +02:00