45
45
//! give a callback fn, rather than taking a closure: it allows us to
46
46
//! easily control precisely what data is given to that fn.
47
47
48
- use encoder:: EncodeContext ;
49
- use index:: Index ;
50
- use schema:: * ;
51
- use isolated_encoder:: IsolatedEncoder ;
48
+ use crate :: encoder:: EncodeContext ;
49
+ use crate :: index:: Index ;
50
+ use crate :: schema:: * ;
51
+ use crate :: isolated_encoder:: IsolatedEncoder ;
52
52
53
53
use rustc:: hir;
54
54
use rustc:: hir:: def_id:: DefId ;
@@ -133,21 +133,21 @@ impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx> {
133
133
/// `DefId` index, or implement the `read` method so that it can add
134
134
/// a read of whatever dep-graph nodes are appropriate.
135
135
pub trait DepGraphRead {
136
- fn read ( & self , tcx : TyCtxt ) ;
136
+ fn read ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) ;
137
137
}
138
138
139
139
impl DepGraphRead for DefId {
140
- fn read ( & self , _tcx : TyCtxt ) { }
140
+ fn read ( & self , _tcx : TyCtxt < ' _ , ' _ , ' _ > ) { }
141
141
}
142
142
143
143
impl DepGraphRead for ast:: NodeId {
144
- fn read ( & self , _tcx : TyCtxt ) { }
144
+ fn read ( & self , _tcx : TyCtxt < ' _ , ' _ , ' _ > ) { }
145
145
}
146
146
147
147
impl < T > DepGraphRead for Option < T >
148
148
where T : DepGraphRead
149
149
{
150
- fn read ( & self , tcx : TyCtxt ) {
150
+ fn read ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) {
151
151
match * self {
152
152
Some ( ref v) => v. read ( tcx) ,
153
153
None => ( ) ,
@@ -158,7 +158,7 @@ impl<T> DepGraphRead for Option<T>
158
158
impl < T > DepGraphRead for [ T ]
159
159
where T : DepGraphRead
160
160
{
161
- fn read ( & self , tcx : TyCtxt ) {
161
+ fn read ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) {
162
162
for i in self {
163
163
i. read ( tcx) ;
164
164
}
@@ -171,7 +171,7 @@ macro_rules! read_tuple {
171
171
where $( $name: DepGraphRead ) ,*
172
172
{
173
173
#[ allow( non_snake_case) ]
174
- fn read( & self , tcx: TyCtxt ) {
174
+ fn read( & self , tcx: TyCtxt < ' _ , ' _ , ' _> ) {
175
175
let & ( $( ref $name) ,* ) = self ;
176
176
$( $name. read( tcx) ; ) *
177
177
}
@@ -184,7 +184,7 @@ read_tuple!(A, B, C);
184
184
macro_rules! read_hir {
185
185
( $t: ty) => {
186
186
impl <' tcx> DepGraphRead for & ' tcx $t {
187
- fn read( & self , tcx: TyCtxt ) {
187
+ fn read( & self , tcx: TyCtxt < ' _ , ' _ , ' _> ) {
188
188
tcx. hir( ) . read( self . id) ;
189
189
}
190
190
}
@@ -208,7 +208,7 @@ read_hir!(hir::MacroDef);
208
208
pub struct Untracked < T > ( pub T ) ;
209
209
210
210
impl < T > DepGraphRead for Untracked < T > {
211
- fn read ( & self , _tcx : TyCtxt ) { }
211
+ fn read ( & self , _tcx : TyCtxt < ' _ , ' _ , ' _ > ) { }
212
212
}
213
213
214
214
/// Newtype that can be used to package up misc data extracted from a
@@ -218,7 +218,7 @@ impl<T> DepGraphRead for Untracked<T> {
218
218
pub struct FromId < T > ( pub ast:: NodeId , pub T ) ;
219
219
220
220
impl < T > DepGraphRead for FromId < T > {
221
- fn read ( & self , tcx : TyCtxt ) {
221
+ fn read ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) {
222
222
tcx. hir ( ) . read ( self . 0 ) ;
223
223
}
224
224
}
0 commit comments