@@ -12,7 +12,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
12
12
place : & str ,
13
13
borrow_place : & str ,
14
14
value_place : & str ,
15
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
15
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
16
16
self . infcx . tcx . sess . create_err ( crate :: session_diagnostics:: MoveBorrow {
17
17
place,
18
18
span,
@@ -28,7 +28,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
28
28
desc : & str ,
29
29
borrow_span : Span ,
30
30
borrow_desc : & str ,
31
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
31
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
32
32
let mut err = struct_span_err ! (
33
33
self ,
34
34
span,
@@ -50,7 +50,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
50
50
old_loan_span : Span ,
51
51
old_opt_via : & str ,
52
52
old_load_end_span : Option < Span > ,
53
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
53
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
54
54
let via =
55
55
|msg : & str | if msg. is_empty ( ) { "" . to_string ( ) } else { format ! ( " (via {})" , msg) } ;
56
56
let mut err = struct_span_err ! (
@@ -98,7 +98,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
98
98
desc : & str ,
99
99
old_loan_span : Span ,
100
100
old_load_end_span : Option < Span > ,
101
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
101
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
102
102
let mut err = struct_span_err ! (
103
103
self ,
104
104
new_loan_span,
@@ -269,7 +269,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
269
269
& self ,
270
270
span : Span ,
271
271
desc : & str ,
272
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
272
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
273
273
struct_span_err ! ( self , span, E0594 , "cannot assign to {}" , desc)
274
274
}
275
275
@@ -348,7 +348,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
348
348
span : Span ,
349
349
path : & str ,
350
350
reason : & str ,
351
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
351
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
352
352
struct_span_err ! ( self , span, E0596 , "cannot borrow {} as mutable{}" , path, reason, )
353
353
}
354
354
@@ -359,7 +359,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
359
359
immutable_place : & str ,
360
360
immutable_section : & str ,
361
361
action : & str ,
362
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
362
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
363
363
let mut err = struct_span_err ! (
364
364
self ,
365
365
mutate_span,
@@ -378,7 +378,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
378
378
& self ,
379
379
span : Span ,
380
380
yield_span : Span ,
381
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
381
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
382
382
let mut err = struct_span_err ! (
383
383
self ,
384
384
span,
@@ -392,7 +392,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
392
392
pub ( crate ) fn cannot_borrow_across_destructor (
393
393
& self ,
394
394
borrow_span : Span ,
395
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
395
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
396
396
struct_span_err ! (
397
397
self ,
398
398
borrow_span,
@@ -405,7 +405,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
405
405
& self ,
406
406
span : Span ,
407
407
path : & str ,
408
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
408
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
409
409
struct_span_err ! ( self , span, E0597 , "{} does not live long enough" , path, )
410
410
}
411
411
@@ -415,7 +415,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
415
415
return_kind : & str ,
416
416
reference_desc : & str ,
417
417
path_desc : & str ,
418
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
418
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
419
419
let mut err = struct_span_err ! (
420
420
self ,
421
421
span,
@@ -440,7 +440,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
440
440
closure_kind : & str ,
441
441
borrowed_path : & str ,
442
442
capture_span : Span ,
443
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
443
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
444
444
let mut err = struct_span_err ! (
445
445
self ,
446
446
closure_span,
@@ -458,14 +458,14 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
458
458
pub ( crate ) fn thread_local_value_does_not_live_long_enough (
459
459
& self ,
460
460
span : Span ,
461
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
461
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
462
462
struct_span_err ! ( self , span, E0712 , "thread-local variable borrowed past end of function" , )
463
463
}
464
464
465
465
pub ( crate ) fn temporary_value_borrowed_for_too_long (
466
466
& self ,
467
467
span : Span ,
468
- ) -> DiagnosticBuilder < ' cx , ErrorGuaranteed > {
468
+ ) -> DiagnosticBuilder < ' tcx , ErrorGuaranteed > {
469
469
struct_span_err ! ( self , span, E0716 , "temporary value dropped while borrowed" , )
470
470
}
471
471
0 commit comments