@@ -15,11 +15,11 @@ use rustc_span::symbol::sym;
15
15
use rustc_span:: { BytePos , MultiSpan , Span , DUMMY_SP } ;
16
16
use rustc_trait_selection:: infer:: InferCtxtExt ;
17
17
18
- use crate :: dataflow :: drop_flag_effects ;
19
- use crate :: dataflow:: indexes :: { MoveOutIndex , MovePathIndex } ;
20
- use crate :: util :: borrowck_errors ;
18
+ use crate :: borrowck_errors ;
19
+ use rustc_mir :: dataflow:: drop_flag_effects ;
20
+ use rustc_mir :: dataflow :: move_paths :: { MoveOutIndex , MovePathIndex } ;
21
21
22
- use crate :: borrow_check :: {
22
+ use crate :: {
23
23
borrow_set:: BorrowData , diagnostics:: Instance , prefixes:: IsPrefixOf ,
24
24
InitializationRequiringAction , MirBorrowckCtxt , PrefixSet , WriteKind ,
25
25
} ;
@@ -49,7 +49,7 @@ enum StorageDeadOrDrop<'tcx> {
49
49
}
50
50
51
51
impl < ' cx , ' tcx > MirBorrowckCtxt < ' cx , ' tcx > {
52
- pub ( in crate :: borrow_check ) fn report_use_of_moved_or_uninitialized (
52
+ pub ( crate ) fn report_use_of_moved_or_uninitialized (
53
53
& mut self ,
54
54
location : Location ,
55
55
desired_action : InitializationRequiringAction ,
@@ -441,7 +441,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
441
441
}
442
442
}
443
443
444
- pub ( in crate :: borrow_check ) fn report_move_out_while_borrowed (
444
+ pub ( crate ) fn report_move_out_while_borrowed (
445
445
& mut self ,
446
446
location : Location ,
447
447
( place, span) : ( Place < ' tcx > , Span ) ,
@@ -489,7 +489,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
489
489
err. buffer ( & mut self . errors_buffer ) ;
490
490
}
491
491
492
- pub ( in crate :: borrow_check ) fn report_use_while_mutably_borrowed (
492
+ pub ( crate ) fn report_use_while_mutably_borrowed (
493
493
& mut self ,
494
494
location : Location ,
495
495
( place, _span) : ( Place < ' tcx > , Span ) ,
@@ -535,7 +535,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
535
535
err
536
536
}
537
537
538
- pub ( in crate :: borrow_check ) fn report_conflicting_borrow (
538
+ pub ( crate ) fn report_conflicting_borrow (
539
539
& mut self ,
540
540
location : Location ,
541
541
( place, span) : ( Place < ' tcx > , Span ) ,
@@ -798,7 +798,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
798
798
/// cannot borrow `a.u` (via `a.u.z.c`) as immutable because it is also borrowed as
799
799
/// mutable (via `a.u.s.b`) [E0502]
800
800
/// ```
801
- pub ( in crate :: borrow_check ) fn describe_place_for_conflicting_borrow (
801
+ pub ( crate ) fn describe_place_for_conflicting_borrow (
802
802
& self ,
803
803
first_borrowed_place : Place < ' tcx > ,
804
804
second_borrowed_place : Place < ' tcx > ,
@@ -875,7 +875,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
875
875
/// short a lifetime. (But sometimes it is more useful to report
876
876
/// it as a more direct conflict between the execution of a
877
877
/// `Drop::drop` with an aliasing borrow.)
878
- pub ( in crate :: borrow_check ) fn report_borrowed_value_does_not_live_long_enough (
878
+ pub ( crate ) fn report_borrowed_value_does_not_live_long_enough (
879
879
& mut self ,
880
880
location : Location ,
881
881
borrow : & BorrowData < ' tcx > ,
@@ -1634,7 +1634,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1634
1634
( result, reinits_reachable)
1635
1635
}
1636
1636
1637
- pub ( in crate :: borrow_check ) fn report_illegal_mutation_of_borrowed (
1637
+ pub ( crate ) fn report_illegal_mutation_of_borrowed (
1638
1638
& mut self ,
1639
1639
location : Location ,
1640
1640
( place, span) : ( Place < ' tcx > , Span ) ,
@@ -1695,7 +1695,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1695
1695
Some ( ( method_did, method_substs) ) ,
1696
1696
) = (
1697
1697
& self . body [ loan. reserve_location . block ] . terminator ,
1698
- crate :: util:: find_self_call (
1698
+ rustc_mir :: util:: find_self_call (
1699
1699
tcx,
1700
1700
self . body ,
1701
1701
loan. assigned_place . local ,
@@ -1726,7 +1726,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1726
1726
/// assigned; `err_place` is a place providing a reason why
1727
1727
/// `place` is not mutable (e.g., the non-`mut` local `x` in an
1728
1728
/// assignment to `x.f`).
1729
- pub ( in crate :: borrow_check ) fn report_illegal_reassignment (
1729
+ pub ( crate ) fn report_illegal_reassignment (
1730
1730
& mut self ,
1731
1731
_location : Location ,
1732
1732
( place, span) : ( Place < ' tcx > , Span ) ,
@@ -2226,7 +2226,7 @@ enum AnnotatedBorrowFnSignature<'tcx> {
2226
2226
impl < ' tcx > AnnotatedBorrowFnSignature < ' tcx > {
2227
2227
/// Annotate the provided diagnostic with information about borrow from the fn signature that
2228
2228
/// helps explain.
2229
- pub ( in crate :: borrow_check ) fn emit (
2229
+ pub ( crate ) fn emit (
2230
2230
& self ,
2231
2231
cx : & mut MirBorrowckCtxt < ' _ , ' tcx > ,
2232
2232
diag : & mut DiagnosticBuilder < ' _ > ,
0 commit comments