@@ -3,7 +3,7 @@ use rustc_errors::{DiagnosticBuilder, DiagnosticId};
3
3
use syntax_pos:: { MultiSpan , Span } ;
4
4
5
5
impl < ' cx , ' tcx > crate :: borrow_check:: MirBorrowckCtxt < ' cx , ' tcx > {
6
- pub ( crate ) fn cannot_move_when_borrowed (
6
+ crate fn cannot_move_when_borrowed (
7
7
& self ,
8
8
span : Span ,
9
9
desc : & str ,
@@ -17,7 +17,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
17
17
)
18
18
}
19
19
20
- pub ( crate ) fn cannot_use_when_mutably_borrowed (
20
+ crate fn cannot_use_when_mutably_borrowed (
21
21
& self ,
22
22
span : Span ,
23
23
desc : & str ,
@@ -40,7 +40,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
40
40
err
41
41
}
42
42
43
- pub ( crate ) fn cannot_act_on_uninitialized_variable (
43
+ crate fn cannot_act_on_uninitialized_variable (
44
44
& self ,
45
45
span : Span ,
46
46
verb : & str ,
@@ -56,7 +56,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
56
56
)
57
57
}
58
58
59
- pub ( crate ) fn cannot_mutably_borrow_multiply (
59
+ crate fn cannot_mutably_borrow_multiply (
60
60
& self ,
61
61
new_loan_span : Span ,
62
62
desc : & str ,
@@ -105,7 +105,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
105
105
err
106
106
}
107
107
108
- pub ( crate ) fn cannot_uniquely_borrow_by_two_closures (
108
+ crate fn cannot_uniquely_borrow_by_two_closures (
109
109
& self ,
110
110
new_loan_span : Span ,
111
111
desc : & str ,
@@ -134,7 +134,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
134
134
err
135
135
}
136
136
137
- pub ( crate ) fn cannot_uniquely_borrow_by_one_closure (
137
+ crate fn cannot_uniquely_borrow_by_one_closure (
138
138
& self ,
139
139
new_loan_span : Span ,
140
140
container_name : & str ,
@@ -165,7 +165,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
165
165
err
166
166
}
167
167
168
- pub ( crate ) fn cannot_reborrow_already_uniquely_borrowed (
168
+ crate fn cannot_reborrow_already_uniquely_borrowed (
169
169
& self ,
170
170
new_loan_span : Span ,
171
171
container_name : & str ,
@@ -201,7 +201,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
201
201
err
202
202
}
203
203
204
- pub ( crate ) fn cannot_reborrow_already_borrowed (
204
+ crate fn cannot_reborrow_already_borrowed (
205
205
& self ,
206
206
span : Span ,
207
207
desc_new : & str ,
@@ -254,7 +254,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
254
254
err
255
255
}
256
256
257
- pub ( crate ) fn cannot_assign_to_borrowed (
257
+ crate fn cannot_assign_to_borrowed (
258
258
& self ,
259
259
span : Span ,
260
260
borrow_span : Span ,
@@ -276,7 +276,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
276
276
err
277
277
}
278
278
279
- pub ( crate ) fn cannot_reassign_immutable (
279
+ crate fn cannot_reassign_immutable (
280
280
& self ,
281
281
span : Span ,
282
282
desc : & str ,
@@ -297,11 +297,11 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
297
297
)
298
298
}
299
299
300
- pub ( crate ) fn cannot_assign ( & self , span : Span , desc : & str ) -> DiagnosticBuilder < ' cx > {
300
+ crate fn cannot_assign ( & self , span : Span , desc : & str ) -> DiagnosticBuilder < ' cx > {
301
301
struct_span_err ! ( self , span, E0594 , "cannot assign to {}" , desc)
302
302
}
303
303
304
- pub ( crate ) fn cannot_move_out_of (
304
+ crate fn cannot_move_out_of (
305
305
& self ,
306
306
move_from_span : Span ,
307
307
move_from_desc : & str ,
@@ -318,7 +318,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
318
318
/// Signal an error due to an attempt to move out of the interior
319
319
/// of an array or slice. `is_index` is None when error origin
320
320
/// didn't capture whether there was an indexing operation or not.
321
- pub ( crate ) fn cannot_move_out_of_interior_noncopy (
321
+ crate fn cannot_move_out_of_interior_noncopy (
322
322
& self ,
323
323
move_from_span : Span ,
324
324
ty : Ty < ' _ > ,
@@ -341,7 +341,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
341
341
err
342
342
}
343
343
344
- pub ( crate ) fn cannot_move_out_of_interior_of_drop (
344
+ crate fn cannot_move_out_of_interior_of_drop (
345
345
& self ,
346
346
move_from_span : Span ,
347
347
container_ty : Ty < ' _ > ,
@@ -357,7 +357,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
357
357
err
358
358
}
359
359
360
- pub ( crate ) fn cannot_act_on_moved_value (
360
+ crate fn cannot_act_on_moved_value (
361
361
& self ,
362
362
use_span : Span ,
363
363
verb : & str ,
@@ -379,7 +379,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
379
379
)
380
380
}
381
381
382
- pub ( crate ) fn cannot_borrow_path_as_mutable_because (
382
+ crate fn cannot_borrow_path_as_mutable_because (
383
383
& self ,
384
384
span : Span ,
385
385
path : & str ,
@@ -395,7 +395,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
395
395
)
396
396
}
397
397
398
- pub ( crate ) fn cannot_mutate_in_match_guard (
398
+ crate fn cannot_mutate_in_match_guard (
399
399
& self ,
400
400
mutate_span : Span ,
401
401
match_span : Span ,
@@ -415,7 +415,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
415
415
err
416
416
}
417
417
418
- pub ( crate ) fn cannot_borrow_across_generator_yield (
418
+ crate fn cannot_borrow_across_generator_yield (
419
419
& self ,
420
420
span : Span ,
421
421
yield_span : Span ,
@@ -430,7 +430,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
430
430
err
431
431
}
432
432
433
- pub ( crate ) fn cannot_borrow_across_destructor (
433
+ crate fn cannot_borrow_across_destructor (
434
434
& self ,
435
435
borrow_span : Span ,
436
436
) -> DiagnosticBuilder < ' cx > {
@@ -442,7 +442,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
442
442
)
443
443
}
444
444
445
- pub ( crate ) fn path_does_not_live_long_enough (
445
+ crate fn path_does_not_live_long_enough (
446
446
& self ,
447
447
span : Span ,
448
448
path : & str ,
@@ -456,7 +456,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
456
456
)
457
457
}
458
458
459
- pub ( crate ) fn cannot_return_reference_to_local (
459
+ crate fn cannot_return_reference_to_local (
460
460
& self ,
461
461
span : Span ,
462
462
return_kind : & str ,
@@ -481,7 +481,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
481
481
err
482
482
}
483
483
484
- pub ( crate ) fn cannot_capture_in_long_lived_closure (
484
+ crate fn cannot_capture_in_long_lived_closure (
485
485
& self ,
486
486
closure_span : Span ,
487
487
borrowed_path : & str ,
@@ -504,7 +504,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
504
504
err
505
505
}
506
506
507
- pub ( crate ) fn thread_local_value_does_not_live_long_enough (
507
+ crate fn thread_local_value_does_not_live_long_enough (
508
508
& self ,
509
509
span : Span ,
510
510
) -> DiagnosticBuilder < ' cx > {
@@ -516,7 +516,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
516
516
)
517
517
}
518
518
519
- pub ( crate ) fn temporary_value_borrowed_for_too_long (
519
+ crate fn temporary_value_borrowed_for_too_long (
520
520
& self ,
521
521
span : Span ,
522
522
) -> DiagnosticBuilder < ' cx > {
@@ -538,7 +538,7 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
538
538
}
539
539
}
540
540
541
- pub ( crate ) fn borrowed_data_escapes_closure < ' tcx > (
541
+ crate fn borrowed_data_escapes_closure < ' tcx > (
542
542
tcx : TyCtxt < ' tcx > ,
543
543
escape_span : Span ,
544
544
escapes_from : & str ,
0 commit comments