@@ -124,10 +124,10 @@ fn comma_sep<T: fmt::Display>(items: impl Iterator<Item = T>) -> impl fmt::Displ
124
124
} )
125
125
}
126
126
127
- crate fn print_generic_bounds < ' a , ' cx : ' a > (
128
- cx : & ' a Context < ' cx > ,
127
+ crate fn print_generic_bounds < ' a , ' tcx : ' a > (
128
+ cx : & ' a Context < ' tcx > ,
129
129
bounds : & ' a [ clean:: GenericBound ] ,
130
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
130
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
131
131
display_fn ( move |f| {
132
132
let mut bounds_dup = FxHashSet :: default ( ) ;
133
133
@@ -144,10 +144,10 @@ crate fn print_generic_bounds<'a, 'cx: 'a>(
144
144
}
145
145
146
146
impl clean:: GenericParamDef {
147
- crate fn print < ' a , ' cx : ' a > (
147
+ crate fn print < ' a , ' tcx : ' a > (
148
148
& ' a self ,
149
- cx : & ' a Context < ' cx > ,
150
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
149
+ cx : & ' a Context < ' tcx > ,
150
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
151
151
display_fn ( move |f| match self . kind {
152
152
clean:: GenericParamDefKind :: Lifetime => write ! ( f, "{}" , self . name) ,
153
153
clean:: GenericParamDefKind :: Type { ref bounds, ref default, .. } => {
@@ -183,10 +183,10 @@ impl clean::GenericParamDef {
183
183
}
184
184
185
185
impl clean:: Generics {
186
- crate fn print < ' a , ' cx : ' a > (
186
+ crate fn print < ' a , ' tcx : ' a > (
187
187
& ' a self ,
188
- cx : & ' a Context < ' cx > ,
189
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
188
+ cx : & ' a Context < ' tcx > ,
189
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
190
190
display_fn ( move |f| {
191
191
let real_params =
192
192
self . params . iter ( ) . filter ( |p| !p. is_synthetic_type_param ( ) ) . collect :: < Vec < _ > > ( ) ;
@@ -205,12 +205,12 @@ impl clean::Generics {
205
205
/// * The Generics from which to emit a where-clause.
206
206
/// * The number of spaces to indent each line with.
207
207
/// * Whether the where-clause needs to add a comma and newline after the last bound.
208
- crate fn print_where_clause < ' a , ' cx : ' a > (
208
+ crate fn print_where_clause < ' a , ' tcx : ' a > (
209
209
gens : & ' a clean:: Generics ,
210
- cx : & ' a Context < ' cx > ,
210
+ cx : & ' a Context < ' tcx > ,
211
211
indent : usize ,
212
212
end_newline : bool ,
213
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
213
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
214
214
display_fn ( move |f| {
215
215
if gens. where_predicates . is_empty ( ) {
216
216
return Ok ( ( ) ) ;
@@ -314,10 +314,10 @@ impl clean::Constant {
314
314
}
315
315
316
316
impl clean:: PolyTrait {
317
- fn print < ' a , ' cx : ' a > (
317
+ fn print < ' a , ' tcx : ' a > (
318
318
& ' a self ,
319
- cx : & ' a Context < ' cx > ,
320
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
319
+ cx : & ' a Context < ' tcx > ,
320
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
321
321
display_fn ( move |f| {
322
322
if !self . generic_params . is_empty ( ) {
323
323
if f. alternate ( ) {
@@ -344,10 +344,10 @@ impl clean::PolyTrait {
344
344
}
345
345
346
346
impl clean:: GenericBound {
347
- crate fn print < ' a , ' cx : ' a > (
347
+ crate fn print < ' a , ' tcx : ' a > (
348
348
& ' a self ,
349
- cx : & ' a Context < ' cx > ,
350
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
349
+ cx : & ' a Context < ' tcx > ,
350
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
351
351
display_fn ( move |f| match self {
352
352
clean:: GenericBound :: Outlives ( lt) => write ! ( f, "{}" , lt. print( ) ) ,
353
353
clean:: GenericBound :: TraitBound ( ty, modifier) => {
@@ -367,10 +367,10 @@ impl clean::GenericBound {
367
367
}
368
368
369
369
impl clean:: GenericArgs {
370
- fn print < ' a , ' cx : ' a > (
370
+ fn print < ' a , ' tcx : ' a > (
371
371
& ' a self ,
372
- cx : & ' a Context < ' cx > ,
373
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
372
+ cx : & ' a Context < ' tcx > ,
373
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
374
374
display_fn ( move |f| {
375
375
match self {
376
376
clean:: GenericArgs :: AngleBracketed { args, bindings } => {
@@ -602,10 +602,10 @@ fn primitive_link(
602
602
}
603
603
604
604
/// Helper to render type parameters
605
- fn tybounds < ' a , ' cx : ' a > (
605
+ fn tybounds < ' a , ' tcx : ' a > (
606
606
param_names : & ' a Option < Vec < clean:: GenericBound > > ,
607
- cx : & ' a Context < ' cx > ,
608
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
607
+ cx : & ' a Context < ' tcx > ,
608
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
609
609
display_fn ( move |f| match * param_names {
610
610
Some ( ref params) => {
611
611
for param in params {
@@ -882,20 +882,20 @@ fn fmt_type<'cx>(
882
882
}
883
883
884
884
impl clean:: Type {
885
- crate fn print < ' b , ' a : ' b , ' cx : ' a > (
885
+ crate fn print < ' b , ' a : ' b , ' tcx : ' a > (
886
886
& ' a self ,
887
- cx : & ' a Context < ' cx > ,
888
- ) -> impl fmt:: Display + ' b + Captures < ' cx > {
887
+ cx : & ' a Context < ' tcx > ,
888
+ ) -> impl fmt:: Display + ' b + Captures < ' tcx > {
889
889
display_fn ( move |f| fmt_type ( self , f, false , cx) )
890
890
}
891
891
}
892
892
893
893
impl clean:: Impl {
894
- crate fn print < ' a , ' cx : ' a > (
894
+ crate fn print < ' a , ' tcx : ' a > (
895
895
& ' a self ,
896
896
use_absolute : bool ,
897
- cx : & ' a Context < ' cx > ,
898
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
897
+ cx : & ' a Context < ' tcx > ,
898
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
899
899
display_fn ( move |f| {
900
900
if f. alternate ( ) {
901
901
write ! ( f, "impl{:#} " , self . generics. print( cx) ) ?;
@@ -924,10 +924,10 @@ impl clean::Impl {
924
924
}
925
925
926
926
impl clean:: Arguments {
927
- crate fn print < ' a , ' cx : ' a > (
927
+ crate fn print < ' a , ' tcx : ' a > (
928
928
& ' a self ,
929
- cx : & ' a Context < ' cx > ,
930
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
929
+ cx : & ' a Context < ' tcx > ,
930
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
931
931
display_fn ( move |f| {
932
932
for ( i, input) in self . values . iter ( ) . enumerate ( ) {
933
933
if !input. name . is_empty ( ) {
@@ -948,10 +948,10 @@ impl clean::Arguments {
948
948
}
949
949
950
950
impl clean:: FnRetTy {
951
- crate fn print < ' a , ' cx : ' a > (
951
+ crate fn print < ' a , ' tcx : ' a > (
952
952
& ' a self ,
953
- cx : & ' a Context < ' cx > ,
954
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
953
+ cx : & ' a Context < ' tcx > ,
954
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
955
955
display_fn ( move |f| match self {
956
956
clean:: Return ( clean:: Tuple ( tys) ) if tys. is_empty ( ) => Ok ( ( ) ) ,
957
957
clean:: Return ( ty) if f. alternate ( ) => {
@@ -964,10 +964,10 @@ impl clean::FnRetTy {
964
964
}
965
965
966
966
impl clean:: BareFunctionDecl {
967
- fn print_hrtb_with_space < ' a , ' cx : ' a > (
967
+ fn print_hrtb_with_space < ' a , ' tcx : ' a > (
968
968
& ' a self ,
969
- cx : & ' a Context < ' cx > ,
970
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
969
+ cx : & ' a Context < ' tcx > ,
970
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
971
971
display_fn ( move |f| {
972
972
if !self . generic_params . is_empty ( ) {
973
973
write ! ( f, "for<{}> " , comma_sep( self . generic_params. iter( ) . map( |g| g. print( cx) ) ) )
@@ -979,10 +979,10 @@ impl clean::BareFunctionDecl {
979
979
}
980
980
981
981
impl clean:: FnDecl {
982
- crate fn print < ' b , ' a : ' b , ' cx : ' a > (
982
+ crate fn print < ' b , ' a : ' b , ' tcx : ' a > (
983
983
& ' a self ,
984
- cx : & ' a Context < ' cx > ,
985
- ) -> impl fmt:: Display + ' b + Captures < ' cx > {
984
+ cx : & ' a Context < ' tcx > ,
985
+ ) -> impl fmt:: Display + ' b + Captures < ' tcx > {
986
986
display_fn ( move |f| {
987
987
let ellipsis = if self . c_variadic { ", ..." } else { "" } ;
988
988
if f. alternate ( ) {
@@ -1011,13 +1011,13 @@ impl clean::FnDecl {
1011
1011
/// * `indent`: The number of spaces to indent each successive line with, if line-wrapping is
1012
1012
/// necessary.
1013
1013
/// * `asyncness`: Whether the function is async or not.
1014
- crate fn full_print < ' a , ' cx : ' a > (
1014
+ crate fn full_print < ' a , ' tcx : ' a > (
1015
1015
& ' a self ,
1016
- cx : & ' a Context < ' cx > ,
1016
+ cx : & ' a Context < ' tcx > ,
1017
1017
header_len : usize ,
1018
1018
indent : usize ,
1019
1019
asyncness : hir:: IsAsync ,
1020
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
1020
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
1021
1021
display_fn ( move |f| self . inner_full_print ( cx, header_len, indent, asyncness, f) )
1022
1022
}
1023
1023
@@ -1132,11 +1132,11 @@ impl clean::FnDecl {
1132
1132
}
1133
1133
1134
1134
impl clean:: Visibility {
1135
- crate fn print_with_space < ' a , ' cx : ' a > (
1135
+ crate fn print_with_space < ' a , ' tcx : ' a > (
1136
1136
self ,
1137
- cx : & ' a Context < ' cx > ,
1137
+ cx : & ' a Context < ' tcx > ,
1138
1138
item_did : DefId ,
1139
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
1139
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
1140
1140
let to_print = match self {
1141
1141
clean:: Public => "pub " . to_owned ( ) ,
1142
1142
clean:: Inherited => String :: new ( ) ,
@@ -1256,10 +1256,10 @@ impl PrintWithSpace for hir::Mutability {
1256
1256
}
1257
1257
1258
1258
impl clean:: Import {
1259
- crate fn print < ' a , ' cx : ' a > (
1259
+ crate fn print < ' a , ' tcx : ' a > (
1260
1260
& ' a self ,
1261
- cx : & ' a Context < ' cx > ,
1262
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
1261
+ cx : & ' a Context < ' tcx > ,
1262
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
1263
1263
display_fn ( move |f| match self . kind {
1264
1264
clean:: ImportKind :: Simple ( name) => {
1265
1265
if name == self . source . path . last ( ) {
@@ -1280,10 +1280,10 @@ impl clean::Import {
1280
1280
}
1281
1281
1282
1282
impl clean:: ImportSource {
1283
- crate fn print < ' a , ' cx : ' a > (
1283
+ crate fn print < ' a , ' tcx : ' a > (
1284
1284
& ' a self ,
1285
- cx : & ' a Context < ' cx > ,
1286
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
1285
+ cx : & ' a Context < ' tcx > ,
1286
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
1287
1287
display_fn ( move |f| match self . did {
1288
1288
Some ( did) => resolved_path ( f, did, & self . path , true , false , cx) ,
1289
1289
_ => {
@@ -1303,10 +1303,10 @@ impl clean::ImportSource {
1303
1303
}
1304
1304
1305
1305
impl clean:: TypeBinding {
1306
- crate fn print < ' a , ' cx : ' a > (
1306
+ crate fn print < ' a , ' tcx : ' a > (
1307
1307
& ' a self ,
1308
- cx : & ' a Context < ' cx > ,
1309
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
1308
+ cx : & ' a Context < ' tcx > ,
1309
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
1310
1310
display_fn ( move |f| {
1311
1311
f. write_str ( & * self . name . as_str ( ) ) ?;
1312
1312
match self . kind {
@@ -1347,10 +1347,10 @@ crate fn print_default_space<'a>(v: bool) -> &'a str {
1347
1347
}
1348
1348
1349
1349
impl clean:: GenericArg {
1350
- crate fn print < ' a , ' cx : ' a > (
1350
+ crate fn print < ' a , ' tcx : ' a > (
1351
1351
& ' a self ,
1352
- cx : & ' a Context < ' cx > ,
1353
- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
1352
+ cx : & ' a Context < ' tcx > ,
1353
+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
1354
1354
display_fn ( move |f| match self {
1355
1355
clean:: GenericArg :: Lifetime ( lt) => fmt:: Display :: fmt ( & lt. print ( ) , f) ,
1356
1356
clean:: GenericArg :: Type ( ty) => fmt:: Display :: fmt ( & ty. print ( cx) , f) ,
0 commit comments