@@ -124,10 +124,10 @@ fn comma_sep<T: fmt::Display>(items: impl Iterator<Item = T>) -> impl fmt::Displ
124124 } )
125125}
126126
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 > ,
129129 bounds : & ' a [ clean:: GenericBound ] ,
130- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
130+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
131131 display_fn ( move |f| {
132132 let mut bounds_dup = FxHashSet :: default ( ) ;
133133
@@ -144,10 +144,10 @@ crate fn print_generic_bounds<'a, 'cx: 'a>(
144144}
145145
146146impl clean:: GenericParamDef {
147- crate fn print < ' a , ' cx : ' a > (
147+ crate fn print < ' a , ' tcx : ' a > (
148148 & ' 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 > {
151151 display_fn ( move |f| match self . kind {
152152 clean:: GenericParamDefKind :: Lifetime => write ! ( f, "{}" , self . name) ,
153153 clean:: GenericParamDefKind :: Type { ref bounds, ref default, .. } => {
@@ -183,10 +183,10 @@ impl clean::GenericParamDef {
183183}
184184
185185impl clean:: Generics {
186- crate fn print < ' a , ' cx : ' a > (
186+ crate fn print < ' a , ' tcx : ' a > (
187187 & ' 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 > {
190190 display_fn ( move |f| {
191191 let real_params =
192192 self . params . iter ( ) . filter ( |p| !p. is_synthetic_type_param ( ) ) . collect :: < Vec < _ > > ( ) ;
@@ -205,12 +205,12 @@ impl clean::Generics {
205205/// * The Generics from which to emit a where-clause.
206206/// * The number of spaces to indent each line with.
207207/// * 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 > (
209209 gens : & ' a clean:: Generics ,
210- cx : & ' a Context < ' cx > ,
210+ cx : & ' a Context < ' tcx > ,
211211 indent : usize ,
212212 end_newline : bool ,
213- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
213+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
214214 display_fn ( move |f| {
215215 if gens. where_predicates . is_empty ( ) {
216216 return Ok ( ( ) ) ;
@@ -314,10 +314,10 @@ impl clean::Constant {
314314}
315315
316316impl clean:: PolyTrait {
317- fn print < ' a , ' cx : ' a > (
317+ fn print < ' a , ' tcx : ' a > (
318318 & ' 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 > {
321321 display_fn ( move |f| {
322322 if !self . generic_params . is_empty ( ) {
323323 if f. alternate ( ) {
@@ -344,10 +344,10 @@ impl clean::PolyTrait {
344344}
345345
346346impl clean:: GenericBound {
347- crate fn print < ' a , ' cx : ' a > (
347+ crate fn print < ' a , ' tcx : ' a > (
348348 & ' 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 > {
351351 display_fn ( move |f| match self {
352352 clean:: GenericBound :: Outlives ( lt) => write ! ( f, "{}" , lt. print( ) ) ,
353353 clean:: GenericBound :: TraitBound ( ty, modifier) => {
@@ -367,10 +367,10 @@ impl clean::GenericBound {
367367}
368368
369369impl clean:: GenericArgs {
370- fn print < ' a , ' cx : ' a > (
370+ fn print < ' a , ' tcx : ' a > (
371371 & ' 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 > {
374374 display_fn ( move |f| {
375375 match self {
376376 clean:: GenericArgs :: AngleBracketed { args, bindings } => {
@@ -602,10 +602,10 @@ fn primitive_link(
602602}
603603
604604/// Helper to render type parameters
605- fn tybounds < ' a , ' cx : ' a > (
605+ fn tybounds < ' a , ' tcx : ' a > (
606606 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 > {
609609 display_fn ( move |f| match * param_names {
610610 Some ( ref params) => {
611611 for param in params {
@@ -882,20 +882,20 @@ fn fmt_type<'cx>(
882882}
883883
884884impl clean:: Type {
885- crate fn print < ' b , ' a : ' b , ' cx : ' a > (
885+ crate fn print < ' b , ' a : ' b , ' tcx : ' a > (
886886 & ' 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 > {
889889 display_fn ( move |f| fmt_type ( self , f, false , cx) )
890890 }
891891}
892892
893893impl clean:: Impl {
894- crate fn print < ' a , ' cx : ' a > (
894+ crate fn print < ' a , ' tcx : ' a > (
895895 & ' a self ,
896896 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 > {
899899 display_fn ( move |f| {
900900 if f. alternate ( ) {
901901 write ! ( f, "impl{:#} " , self . generics. print( cx) ) ?;
@@ -924,10 +924,10 @@ impl clean::Impl {
924924}
925925
926926impl clean:: Arguments {
927- crate fn print < ' a , ' cx : ' a > (
927+ crate fn print < ' a , ' tcx : ' a > (
928928 & ' 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 > {
931931 display_fn ( move |f| {
932932 for ( i, input) in self . values . iter ( ) . enumerate ( ) {
933933 if !input. name . is_empty ( ) {
@@ -948,10 +948,10 @@ impl clean::Arguments {
948948}
949949
950950impl clean:: FnRetTy {
951- crate fn print < ' a , ' cx : ' a > (
951+ crate fn print < ' a , ' tcx : ' a > (
952952 & ' 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 > {
955955 display_fn ( move |f| match self {
956956 clean:: Return ( clean:: Tuple ( tys) ) if tys. is_empty ( ) => Ok ( ( ) ) ,
957957 clean:: Return ( ty) if f. alternate ( ) => {
@@ -964,10 +964,10 @@ impl clean::FnRetTy {
964964}
965965
966966impl clean:: BareFunctionDecl {
967- fn print_hrtb_with_space < ' a , ' cx : ' a > (
967+ fn print_hrtb_with_space < ' a , ' tcx : ' a > (
968968 & ' 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 > {
971971 display_fn ( move |f| {
972972 if !self . generic_params . is_empty ( ) {
973973 write ! ( f, "for<{}> " , comma_sep( self . generic_params. iter( ) . map( |g| g. print( cx) ) ) )
@@ -979,10 +979,10 @@ impl clean::BareFunctionDecl {
979979}
980980
981981impl clean:: FnDecl {
982- crate fn print < ' b , ' a : ' b , ' cx : ' a > (
982+ crate fn print < ' b , ' a : ' b , ' tcx : ' a > (
983983 & ' 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 > {
986986 display_fn ( move |f| {
987987 let ellipsis = if self . c_variadic { ", ..." } else { "" } ;
988988 if f. alternate ( ) {
@@ -1011,13 +1011,13 @@ impl clean::FnDecl {
10111011 /// * `indent`: The number of spaces to indent each successive line with, if line-wrapping is
10121012 /// necessary.
10131013 /// * `asyncness`: Whether the function is async or not.
1014- crate fn full_print < ' a , ' cx : ' a > (
1014+ crate fn full_print < ' a , ' tcx : ' a > (
10151015 & ' a self ,
1016- cx : & ' a Context < ' cx > ,
1016+ cx : & ' a Context < ' tcx > ,
10171017 header_len : usize ,
10181018 indent : usize ,
10191019 asyncness : hir:: IsAsync ,
1020- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
1020+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
10211021 display_fn ( move |f| self . inner_full_print ( cx, header_len, indent, asyncness, f) )
10221022 }
10231023
@@ -1132,11 +1132,11 @@ impl clean::FnDecl {
11321132}
11331133
11341134impl clean:: Visibility {
1135- crate fn print_with_space < ' a , ' cx : ' a > (
1135+ crate fn print_with_space < ' a , ' tcx : ' a > (
11361136 self ,
1137- cx : & ' a Context < ' cx > ,
1137+ cx : & ' a Context < ' tcx > ,
11381138 item_did : DefId ,
1139- ) -> impl fmt:: Display + ' a + Captures < ' cx > {
1139+ ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
11401140 let to_print = match self {
11411141 clean:: Public => "pub " . to_owned ( ) ,
11421142 clean:: Inherited => String :: new ( ) ,
@@ -1256,10 +1256,10 @@ impl PrintWithSpace for hir::Mutability {
12561256}
12571257
12581258impl clean:: Import {
1259- crate fn print < ' a , ' cx : ' a > (
1259+ crate fn print < ' a , ' tcx : ' a > (
12601260 & ' 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 > {
12631263 display_fn ( move |f| match self . kind {
12641264 clean:: ImportKind :: Simple ( name) => {
12651265 if name == self . source . path . last ( ) {
@@ -1280,10 +1280,10 @@ impl clean::Import {
12801280}
12811281
12821282impl clean:: ImportSource {
1283- crate fn print < ' a , ' cx : ' a > (
1283+ crate fn print < ' a , ' tcx : ' a > (
12841284 & ' 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 > {
12871287 display_fn ( move |f| match self . did {
12881288 Some ( did) => resolved_path ( f, did, & self . path , true , false , cx) ,
12891289 _ => {
@@ -1303,10 +1303,10 @@ impl clean::ImportSource {
13031303}
13041304
13051305impl clean:: TypeBinding {
1306- crate fn print < ' a , ' cx : ' a > (
1306+ crate fn print < ' a , ' tcx : ' a > (
13071307 & ' 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 > {
13101310 display_fn ( move |f| {
13111311 f. write_str ( & * self . name . as_str ( ) ) ?;
13121312 match self . kind {
@@ -1347,10 +1347,10 @@ crate fn print_default_space<'a>(v: bool) -> &'a str {
13471347}
13481348
13491349impl clean:: GenericArg {
1350- crate fn print < ' a , ' cx : ' a > (
1350+ crate fn print < ' a , ' tcx : ' a > (
13511351 & ' 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 > {
13541354 display_fn ( move |f| match self {
13551355 clean:: GenericArg :: Lifetime ( lt) => fmt:: Display :: fmt ( & lt. print ( ) , f) ,
13561356 clean:: GenericArg :: Type ( ty) => fmt:: Display :: fmt ( & ty. print ( cx) , f) ,
0 commit comments