@@ -46,7 +46,7 @@ use std::slice;
46
46
impl < ' a , ' tcx > FnCtxt < ' a , ' tcx > {
47
47
/// Produces warning on the given node, if the current point in the
48
48
/// function is unreachable, and there hasn't been another warning.
49
- pub ( in super :: super ) fn warn_if_unreachable ( & self , id : HirId , span : Span , kind : & str ) {
49
+ pub ( crate ) fn warn_if_unreachable ( & self , id : HirId , span : Span , kind : & str ) {
50
50
// FIXME: Combine these two 'if' expressions into one once
51
51
// let chains are implemented
52
52
if let Diverges :: Always { span : orig_span, custom_note } = self . diverges . get ( ) {
@@ -86,7 +86,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
86
86
// FIXME(-Znext-solver): A lot of the calls to this method should
87
87
// probably be `try_structurally_resolve_type` or `structurally_resolve_type` instead.
88
88
#[ instrument( skip( self ) , level = "debug" , ret) ]
89
- pub ( in super :: super ) fn resolve_vars_with_obligations ( & self , mut ty : Ty < ' tcx > ) -> Ty < ' tcx > {
89
+ pub ( crate ) fn resolve_vars_with_obligations ( & self , mut ty : Ty < ' tcx > ) -> Ty < ' tcx > {
90
90
// No Infer()? Nothing needs doing.
91
91
if !ty. has_non_region_infer ( ) {
92
92
debug ! ( "no inference var, nothing needs doing" ) ;
@@ -108,7 +108,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
108
108
self . resolve_vars_if_possible ( ty)
109
109
}
110
110
111
- pub ( in super :: super ) fn record_deferred_call_resolution (
111
+ pub ( crate ) fn record_deferred_call_resolution (
112
112
& self ,
113
113
closure_def_id : LocalDefId ,
114
114
r : DeferredCallResolution < ' tcx > ,
@@ -117,7 +117,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
117
117
deferred_call_resolutions. entry ( closure_def_id) . or_default ( ) . push ( r) ;
118
118
}
119
119
120
- pub ( in super :: super ) fn remove_deferred_call_resolutions (
120
+ pub ( crate ) fn remove_deferred_call_resolutions (
121
121
& self ,
122
122
closure_def_id : LocalDefId ,
123
123
) -> Vec < DeferredCallResolution < ' tcx > > {
@@ -171,7 +171,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
171
171
}
172
172
173
173
#[ instrument( level = "debug" , skip( self ) ) ]
174
- pub ( in super :: super ) fn write_resolution (
174
+ pub ( crate ) fn write_resolution (
175
175
& self ,
176
176
hir_id : HirId ,
177
177
r : Result < ( DefKind , DefId ) , ErrorGuaranteed > ,
@@ -335,7 +335,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
335
335
}
336
336
337
337
/// Instantiates and normalizes the bounds for a given item
338
- pub ( in super :: super ) fn instantiate_bounds (
338
+ pub ( crate ) fn instantiate_bounds (
339
339
& self ,
340
340
span : Span ,
341
341
def_id : DefId ,
@@ -348,7 +348,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
348
348
result
349
349
}
350
350
351
- pub ( in super :: super ) fn normalize < T > ( & self , span : Span , value : T ) -> T
351
+ pub ( crate ) fn normalize < T > ( & self , span : Span , value : T ) -> T
352
352
where
353
353
T : TypeFoldable < TyCtxt < ' tcx > > ,
354
354
{
@@ -536,7 +536,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
536
536
self . normalize ( span, field. ty ( self . tcx , args) )
537
537
}
538
538
539
- pub ( in super :: super ) fn resolve_rvalue_scopes ( & self , def_id : DefId ) {
539
+ pub ( crate ) fn resolve_rvalue_scopes ( & self , def_id : DefId ) {
540
540
let scope_tree = self . tcx . region_scope_tree ( def_id) ;
541
541
let rvalue_scopes = { rvalue_scopes:: resolve_rvalue_scopes ( self , scope_tree, def_id) } ;
542
542
let mut typeck_results = self . typeck_results . borrow_mut ( ) ;
@@ -552,7 +552,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
552
552
/// We must not attempt to select obligations after this method has run, or risk query cycle
553
553
/// ICE.
554
554
#[ instrument( level = "debug" , skip( self ) ) ]
555
- pub ( in super :: super ) fn resolve_coroutine_interiors ( & self ) {
555
+ pub ( crate ) fn resolve_coroutine_interiors ( & self ) {
556
556
// Try selecting all obligations that are not blocked on inference variables.
557
557
// Once we start unifying coroutine witnesses, trying to select obligations on them will
558
558
// trigger query cycle ICEs, as doing so requires MIR.
@@ -593,7 +593,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
593
593
}
594
594
595
595
#[ instrument( skip( self ) , level = "debug" ) ]
596
- pub ( in super :: super ) fn report_ambiguity_errors ( & self ) {
596
+ pub ( crate ) fn report_ambiguity_errors ( & self ) {
597
597
let mut errors = self . fulfillment_cx . borrow_mut ( ) . collect_remaining_errors ( self ) ;
598
598
599
599
if !errors. is_empty ( ) {
@@ -608,7 +608,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
608
608
}
609
609
610
610
/// Select as many obligations as we can at present.
611
- pub ( in super :: super ) fn select_obligations_where_possible (
611
+ pub ( crate ) fn select_obligations_where_possible (
612
612
& self ,
613
613
mutate_fulfillment_errors : impl Fn ( & mut Vec < traits:: FulfillmentError < ' tcx > > ) ,
614
614
) {
@@ -624,7 +624,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
624
624
/// returns a type of `&T`, but the actual type we assign to the
625
625
/// *expression* is `T`. So this function just peels off the return
626
626
/// type by one layer to yield `T`.
627
- pub ( in super :: super ) fn make_overloaded_place_return_type (
627
+ pub ( crate ) fn make_overloaded_place_return_type (
628
628
& self ,
629
629
method : MethodCallee < ' tcx > ,
630
630
) -> ty:: TypeAndMut < ' tcx > {
@@ -635,7 +635,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
635
635
ret_ty. builtin_deref ( true ) . unwrap ( )
636
636
}
637
637
638
- pub ( in super :: super ) fn type_var_is_sized ( & self , self_ty : ty:: TyVid ) -> bool {
638
+ pub ( crate ) fn type_var_is_sized ( & self , self_ty : ty:: TyVid ) -> bool {
639
639
let sized_did = self . tcx . lang_items ( ) . sized_trait ( ) ;
640
640
self . obligations_for_self_ty ( self_ty) . any ( |obligation| {
641
641
match obligation. predicate . kind ( ) . skip_binder ( ) {
@@ -647,15 +647,15 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
647
647
} )
648
648
}
649
649
650
- pub ( in super :: super ) fn err_args ( & self , len : usize ) -> Vec < Ty < ' tcx > > {
650
+ pub ( crate ) fn err_args ( & self , len : usize ) -> Vec < Ty < ' tcx > > {
651
651
let ty_error = Ty :: new_misc_error ( self . tcx ) ;
652
652
vec ! [ ty_error; len]
653
653
}
654
654
655
655
/// Unifies the output type with the expected type early, for more coercions
656
656
/// and forward type information on the input expressions.
657
657
#[ instrument( skip( self , call_span) , level = "debug" ) ]
658
- pub ( in super :: super ) fn expected_inputs_for_expected_output (
658
+ pub ( crate ) fn expected_inputs_for_expected_output (
659
659
& self ,
660
660
call_span : Span ,
661
661
expected_ret : Expectation < ' tcx > ,
@@ -688,7 +688,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
688
688
expect_args
689
689
}
690
690
691
- pub ( in super :: super ) fn resolve_lang_item_path (
691
+ pub ( crate ) fn resolve_lang_item_path (
692
692
& self ,
693
693
lang_item : hir:: LangItem ,
694
694
span : Span ,
@@ -867,7 +867,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
867
867
/// but we often want access to the parent function's signature.
868
868
///
869
869
/// Otherwise, return false.
870
- pub ( in super :: super ) fn get_node_fn_decl (
870
+ pub ( crate ) fn get_node_fn_decl (
871
871
& self ,
872
872
node : Node < ' tcx > ,
873
873
) -> Option < ( LocalDefId , & ' tcx hir:: FnDecl < ' tcx > , Ident , bool ) > {
@@ -945,7 +945,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
945
945
} )
946
946
}
947
947
948
- pub ( in super :: super ) fn note_internal_mutation_in_method (
948
+ pub ( crate ) fn note_internal_mutation_in_method (
949
949
& self ,
950
950
err : & mut Diag < ' _ > ,
951
951
expr : & hir:: Expr < ' _ > ,
@@ -1490,7 +1490,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1490
1490
}
1491
1491
}
1492
1492
1493
- pub ( in super :: super ) fn with_breakable_ctxt < F : FnOnce ( ) -> R , R > (
1493
+ pub ( crate ) fn with_breakable_ctxt < F : FnOnce ( ) -> R , R > (
1494
1494
& self ,
1495
1495
id : HirId ,
1496
1496
ctxt : BreakableCtxt < ' tcx > ,
@@ -1516,7 +1516,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1516
1516
1517
1517
/// Instantiate a QueryResponse in a probe context, without a
1518
1518
/// good ObligationCause.
1519
- pub ( in super :: super ) fn probe_instantiate_query_response (
1519
+ pub ( crate ) fn probe_instantiate_query_response (
1520
1520
& self ,
1521
1521
span : Span ,
1522
1522
original_values : & OriginalQueryValues < ' tcx > ,
@@ -1531,7 +1531,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1531
1531
}
1532
1532
1533
1533
/// Returns `true` if an expression is contained inside the LHS of an assignment expression.
1534
- pub ( in super :: super ) fn expr_in_place ( & self , mut expr_id : HirId ) -> bool {
1534
+ pub ( crate ) fn expr_in_place ( & self , mut expr_id : HirId ) -> bool {
1535
1535
let mut contained_in_place = false ;
1536
1536
1537
1537
while let hir:: Node :: Expr ( parent_expr) = self . tcx . parent_hir_node ( expr_id) {
0 commit comments