diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-08-27 23:03:21 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-08-30 11:15:24 -0700 |
| commit | 9e45e90596faf6e741665d1c4ff6b94ad3885dbe (patch) | |
| tree | dd238a7a642f65838f97452639504ab887120b52 /compiler/rustc_mir/src | |
| parent | a88dc37c54fa7ed2d1758d06508223677b65d387 (diff) | |
| download | rust-9e45e90596faf6e741665d1c4ff6b94ad3885dbe.tar.gz rust-9e45e90596faf6e741665d1c4ff6b94ad3885dbe.zip | |
Allow access to the underlying `Results` from a `ResultsCursor`
Diffstat (limited to 'compiler/rustc_mir/src')
| -rw-r--r-- | compiler/rustc_mir/src/dataflow/framework/cursor.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_mir/src/dataflow/framework/cursor.rs b/compiler/rustc_mir/src/dataflow/framework/cursor.rs index 4f5930dc3f5..8ec0169d8c1 100644 --- a/compiler/rustc_mir/src/dataflow/framework/cursor.rs +++ b/compiler/rustc_mir/src/dataflow/framework/cursor.rs @@ -68,7 +68,12 @@ where self.body } - /// Returns the `Analysis` used to generate the underlying results. + /// Returns the underlying `Results`. + pub fn results(&self) -> &Results<'tcx, A> { + &self.results.borrow() + } + + /// Returns the `Analysis` used to generate the underlying `Results`. pub fn analysis(&self) -> &A { &self.results.borrow().analysis } |
