4545//! give a callback fn, rather than taking a closure: it allows us to
4646//! easily control precisely what data is given to that fn.
4747
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 ;
5252
5353use rustc:: hir;
5454use rustc:: hir:: def_id:: DefId ;
@@ -133,21 +133,21 @@ impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx> {
133133/// `DefId` index, or implement the `read` method so that it can add
134134/// a read of whatever dep-graph nodes are appropriate.
135135pub trait DepGraphRead {
136- fn read ( & self , tcx : TyCtxt ) ;
136+ fn read ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) ;
137137}
138138
139139impl DepGraphRead for DefId {
140- fn read ( & self , _tcx : TyCtxt ) { }
140+ fn read ( & self , _tcx : TyCtxt < ' _ , ' _ , ' _ > ) { }
141141}
142142
143143impl DepGraphRead for ast:: NodeId {
144- fn read ( & self , _tcx : TyCtxt ) { }
144+ fn read ( & self , _tcx : TyCtxt < ' _ , ' _ , ' _ > ) { }
145145}
146146
147147impl < T > DepGraphRead for Option < T >
148148 where T : DepGraphRead
149149{
150- fn read ( & self , tcx : TyCtxt ) {
150+ fn read ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) {
151151 match * self {
152152 Some ( ref v) => v. read ( tcx) ,
153153 None => ( ) ,
@@ -158,7 +158,7 @@ impl<T> DepGraphRead for Option<T>
158158impl < T > DepGraphRead for [ T ]
159159 where T : DepGraphRead
160160{
161- fn read ( & self , tcx : TyCtxt ) {
161+ fn read ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) {
162162 for i in self {
163163 i. read ( tcx) ;
164164 }
@@ -171,7 +171,7 @@ macro_rules! read_tuple {
171171 where $( $name: DepGraphRead ) ,*
172172 {
173173 #[ allow( non_snake_case) ]
174- fn read( & self , tcx: TyCtxt ) {
174+ fn read( & self , tcx: TyCtxt < ' _ , ' _ , ' _> ) {
175175 let & ( $( ref $name) ,* ) = self ;
176176 $( $name. read( tcx) ; ) *
177177 }
@@ -184,7 +184,7 @@ read_tuple!(A, B, C);
184184macro_rules! read_hir {
185185 ( $t: ty) => {
186186 impl <' tcx> DepGraphRead for & ' tcx $t {
187- fn read( & self , tcx: TyCtxt ) {
187+ fn read( & self , tcx: TyCtxt < ' _ , ' _ , ' _> ) {
188188 tcx. hir( ) . read( self . id) ;
189189 }
190190 }
@@ -208,7 +208,7 @@ read_hir!(hir::MacroDef);
208208pub struct Untracked < T > ( pub T ) ;
209209
210210impl < T > DepGraphRead for Untracked < T > {
211- fn read ( & self , _tcx : TyCtxt ) { }
211+ fn read ( & self , _tcx : TyCtxt < ' _ , ' _ , ' _ > ) { }
212212}
213213
214214/// Newtype that can be used to package up misc data extracted from a
@@ -218,7 +218,7 @@ impl<T> DepGraphRead for Untracked<T> {
218218pub struct FromId < T > ( pub ast:: NodeId , pub T ) ;
219219
220220impl < T > DepGraphRead for FromId < T > {
221- fn read ( & self , tcx : TyCtxt ) {
221+ fn read ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) {
222222 tcx. hir ( ) . read ( self . 0 ) ;
223223 }
224224}
0 commit comments