rustc: expose the mir::Body reference lifetime from mir::ReadOnlyBodyCache (#64736 fallout).
This commit is contained in:
parent
4810cf1d1b
commit
a57aea88d4
16 changed files with 62 additions and 70 deletions
|
|
@ -279,18 +279,10 @@ impl<'a, 'b, 'tcx> graph::GraphSuccessors<'b> for ReadOnlyBodyCache<'a, 'tcx> {
|
|||
|
||||
|
||||
impl Deref for ReadOnlyBodyCache<'a, 'tcx> {
|
||||
type Target = Body<'tcx>;
|
||||
type Target = &'a Body<'tcx>;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
self.body
|
||||
}
|
||||
}
|
||||
|
||||
impl Index<BasicBlock> for ReadOnlyBodyCache<'a, 'tcx> {
|
||||
type Output = BasicBlockData<'tcx>;
|
||||
|
||||
fn index(&self, index: BasicBlock) -> &BasicBlockData<'tcx> {
|
||||
&self.body[index]
|
||||
&self.body
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue