File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -1840,17 +1840,6 @@ impl<'a, 'tcx> Place<'tcx> {
1840
1840
} )
1841
1841
}
1842
1842
1843
- pub fn elem (
1844
- self ,
1845
- tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
1846
- elem : PlaceElem < ' tcx > ,
1847
- ) -> Self {
1848
- Place {
1849
- base : self . base ,
1850
- elems : tcx. intern_place_elems ( & [ elem] ) ,
1851
- }
1852
- }
1853
-
1854
1843
pub fn local ( local : Local ) -> Self {
1855
1844
Place {
1856
1845
base : PlaceBase :: Local ( local) ,
@@ -1874,6 +1863,19 @@ impl<'a, 'tcx> Place<'tcx> {
1874
1863
elems : Slice :: empty ( ) ,
1875
1864
}
1876
1865
}
1866
+
1867
+ fn elem (
1868
+ self ,
1869
+ tcx : TyCtxt < ' _ , ' _ , ' tcx > ,
1870
+ elem : PlaceElem < ' tcx > ,
1871
+ ) -> Self {
1872
+ Place {
1873
+ base : self . base ,
1874
+ elems : tcx. mk_place_elems (
1875
+ self . elems . iter ( ) . cloned ( ) . chain ( iter:: once ( elem) )
1876
+ ) ,
1877
+ }
1878
+ }
1877
1879
}
1878
1880
1879
1881
impl < ' tcx > Debug for PlaceBase < ' tcx > {
You can’t perform that action at this time.
0 commit comments