@@ -10,7 +10,7 @@ use rustc_middle::mir::Local;
1010use rustc_middle:: ty:: { RegionVid , TyCtxt } ;
1111use rustc_mir_dataflow:: move_paths:: MovePathIndex ;
1212
13- use super :: { LocationIndex , LocationTable } ;
13+ use super :: { LocationIndex , PoloniusLocationTable } ;
1414use crate :: BorrowIndex ;
1515
1616#[ derive( Copy , Clone , Debug ) ]
@@ -63,7 +63,7 @@ impl AllFacts {
6363 fn write_to_dir (
6464 & self ,
6565 dir : impl AsRef < Path > ,
66- location_table : & LocationTable ,
66+ location_table : & PoloniusLocationTable ,
6767 ) -> Result < ( ) , Box < dyn Error > > {
6868 let dir: & Path = dir. as_ref ( ) ;
6969 fs:: create_dir_all ( dir) ?;
@@ -119,7 +119,7 @@ impl Atom for LocationIndex {
119119}
120120
121121struct FactWriter < ' w > {
122- location_table : & ' w LocationTable ,
122+ location_table : & ' w PoloniusLocationTable ,
123123 dir : & ' w Path ,
124124}
125125
@@ -141,15 +141,15 @@ trait FactRow {
141141 fn write (
142142 & self ,
143143 out : & mut dyn Write ,
144- location_table : & LocationTable ,
144+ location_table : & PoloniusLocationTable ,
145145 ) -> Result < ( ) , Box < dyn Error > > ;
146146}
147147
148148impl FactRow for PoloniusRegionVid {
149149 fn write (
150150 & self ,
151151 out : & mut dyn Write ,
152- location_table : & LocationTable ,
152+ location_table : & PoloniusLocationTable ,
153153 ) -> Result < ( ) , Box < dyn Error > > {
154154 write_row ( out, location_table, & [ self ] )
155155 }
@@ -163,7 +163,7 @@ where
163163 fn write (
164164 & self ,
165165 out : & mut dyn Write ,
166- location_table : & LocationTable ,
166+ location_table : & PoloniusLocationTable ,
167167 ) -> Result < ( ) , Box < dyn Error > > {
168168 write_row ( out, location_table, & [ & self . 0 , & self . 1 ] )
169169 }
@@ -178,7 +178,7 @@ where
178178 fn write (
179179 & self ,
180180 out : & mut dyn Write ,
181- location_table : & LocationTable ,
181+ location_table : & PoloniusLocationTable ,
182182 ) -> Result < ( ) , Box < dyn Error > > {
183183 write_row ( out, location_table, & [ & self . 0 , & self . 1 , & self . 2 ] )
184184 }
@@ -194,15 +194,15 @@ where
194194 fn write (
195195 & self ,
196196 out : & mut dyn Write ,
197- location_table : & LocationTable ,
197+ location_table : & PoloniusLocationTable ,
198198 ) -> Result < ( ) , Box < dyn Error > > {
199199 write_row ( out, location_table, & [ & self . 0 , & self . 1 , & self . 2 , & self . 3 ] )
200200 }
201201}
202202
203203fn write_row (
204204 out : & mut dyn Write ,
205- location_table : & LocationTable ,
205+ location_table : & PoloniusLocationTable ,
206206 columns : & [ & dyn FactCell ] ,
207207) -> Result < ( ) , Box < dyn Error > > {
208208 for ( index, c) in columns. iter ( ) . enumerate ( ) {
@@ -213,41 +213,41 @@ fn write_row(
213213}
214214
215215trait FactCell {
216- fn to_string ( & self , location_table : & LocationTable ) -> String ;
216+ fn to_string ( & self , location_table : & PoloniusLocationTable ) -> String ;
217217}
218218
219219impl FactCell for BorrowIndex {
220- fn to_string ( & self , _location_table : & LocationTable ) -> String {
220+ fn to_string ( & self , _location_table : & PoloniusLocationTable ) -> String {
221221 format ! ( "{self:?}" )
222222 }
223223}
224224
225225impl FactCell for Local {
226- fn to_string ( & self , _location_table : & LocationTable ) -> String {
226+ fn to_string ( & self , _location_table : & PoloniusLocationTable ) -> String {
227227 format ! ( "{self:?}" )
228228 }
229229}
230230
231231impl FactCell for MovePathIndex {
232- fn to_string ( & self , _location_table : & LocationTable ) -> String {
232+ fn to_string ( & self , _location_table : & PoloniusLocationTable ) -> String {
233233 format ! ( "{self:?}" )
234234 }
235235}
236236
237237impl FactCell for PoloniusRegionVid {
238- fn to_string ( & self , _location_table : & LocationTable ) -> String {
238+ fn to_string ( & self , _location_table : & PoloniusLocationTable ) -> String {
239239 format ! ( "{self:?}" )
240240 }
241241}
242242
243243impl FactCell for RegionVid {
244- fn to_string ( & self , _location_table : & LocationTable ) -> String {
244+ fn to_string ( & self , _location_table : & PoloniusLocationTable ) -> String {
245245 format ! ( "{self:?}" )
246246 }
247247}
248248
249249impl FactCell for LocationIndex {
250- fn to_string ( & self , location_table : & LocationTable ) -> String {
250+ fn to_string ( & self , location_table : & PoloniusLocationTable ) -> String {
251251 format ! ( "{:?}" , location_table. to_rich_location( * self ) )
252252 }
253253}
0 commit comments