diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2023-05-24 15:05:04 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-24 15:05:04 -0700 |
| commit | b84ab57f90a83e03bb0ac5d6ed13ec3f7e3edb94 (patch) | |
| tree | f2e039aad6ba6a7d1dea19f7e36e9616cdd7a4f5 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | a9a4c9b3dbfcd7c51b377985ccc2a030f93da9fb (diff) | |
| parent | 8dac074087afc9f02a794027bede787bb9367ad3 (diff) | |
| download | rust-b84ab57f90a83e03bb0ac5d6ed13ec3f7e3edb94.tar.gz rust-b84ab57f90a83e03bb0ac5d6ed13ec3f7e3edb94.zip | |
Rollup merge of #111840 - voidc:borrowck-consumers, r=oli-obk
Expose more information in `get_body_with_borrowck_facts` Verification tools for Rust such as, for example, Creusot or Prusti would benefit from having access to more information computed by the borrow checker. As a first step in that direction, #86977 added the `get_body_with_borrowck_facts` API, allowing compiler consumers to obtain a `mir::Body` with accompanying borrow checker information. At RustVerify 2023, multiple people working on verification tools expressed their need for a more comprehensive API. While eventually borrow information could be part of Stable MIR, in the meantime, this PR proposes a more limited approach, extending the existing `get_body_with_borrowck_facts` API. In summary, we propose the following changes: - Permit obtaining the borrow-checked body without necessarily running Polonius - Return the `BorrowSet` and the `RegionInferenceContext` in `BodyWithBorrowckFacts` - Provide a way to compute the `borrows_out_of_scope_at_location` map - Make some helper methods public This is similar to #108328 but smaller in scope. `@smoelius` Do you think these changes would also be sufficient for your needs? r? `@oli-obk` cc `@JonasAlaif`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
