@@ -83,7 +83,7 @@ pub use need_type_info::TypeAnnotationNeeded;
83
83
84
84
pub mod nice_region_error;
85
85
86
- pub ( super ) fn note_and_explain_region (
86
+ pub ( super ) fn note_and_explain_region < ' tcx > (
87
87
tcx : TyCtxt < ' tcx > ,
88
88
err : & mut DiagnosticBuilder < ' _ > ,
89
89
prefix : & str ,
@@ -116,7 +116,7 @@ pub(super) fn note_and_explain_region(
116
116
emit_msg_span ( err, prefix, description, span, suffix) ;
117
117
}
118
118
119
- fn explain_free_region (
119
+ fn explain_free_region < ' tcx > (
120
120
tcx : TyCtxt < ' tcx > ,
121
121
err : & mut DiagnosticBuilder < ' _ > ,
122
122
prefix : & str ,
@@ -128,7 +128,7 @@ fn explain_free_region(
128
128
label_msg_span ( err, prefix, description, span, suffix) ;
129
129
}
130
130
131
- fn msg_span_from_free_region (
131
+ fn msg_span_from_free_region < ' tcx > (
132
132
tcx : TyCtxt < ' tcx > ,
133
133
region : ty:: Region < ' tcx > ,
134
134
alt_span : Option < Span > ,
@@ -145,7 +145,7 @@ fn msg_span_from_free_region(
145
145
}
146
146
}
147
147
148
- fn msg_span_from_early_bound_and_free_regions (
148
+ fn msg_span_from_early_bound_and_free_regions < ' tcx > (
149
149
tcx : TyCtxt < ' tcx > ,
150
150
region : ty:: Region < ' tcx > ,
151
151
) -> ( String , Span ) {
@@ -226,7 +226,7 @@ fn label_msg_span(
226
226
}
227
227
}
228
228
229
- pub fn unexpected_hidden_region_diagnostic (
229
+ pub fn unexpected_hidden_region_diagnostic < ' tcx > (
230
230
tcx : TyCtxt < ' tcx > ,
231
231
span : Span ,
232
232
hidden_ty : Ty < ' tcx > ,
@@ -316,7 +316,7 @@ pub fn unexpected_hidden_region_diagnostic(
316
316
/// with the other type. A TyVar inference type is compatible with any type, and an IntVar or
317
317
/// FloatVar inference type are compatible with themselves or their concrete types (Int and
318
318
/// Float types, respectively). When comparing two ADTs, these rules apply recursively.
319
- pub fn same_type_modulo_infer ( a : Ty < ' tcx > , b : Ty < ' ctx > ) -> bool {
319
+ pub fn same_type_modulo_infer < ' tcx > ( a : Ty < ' tcx > , b : Ty < ' tcx > ) -> bool {
320
320
match ( & a. kind ( ) , & b. kind ( ) ) {
321
321
( & ty:: Adt ( did_a, substs_a) , & ty:: Adt ( did_b, substs_b) ) => {
322
322
if did_a != did_b {
0 commit comments