@@ -46,7 +46,7 @@ use std::slice;
4646impl < ' a , ' tcx > FnCtxt < ' a , ' tcx > {
4747 /// Produces warning on the given node, if the current point in the
4848 /// 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 ) {
5050 // FIXME: Combine these two 'if' expressions into one once
5151 // let chains are implemented
5252 if let Diverges :: Always { span : orig_span, custom_note } = self . diverges . get ( ) {
@@ -86,7 +86,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
8686 // FIXME(-Znext-solver): A lot of the calls to this method should
8787 // probably be `try_structurally_resolve_type` or `structurally_resolve_type` instead.
8888 #[ 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 > {
9090 // No Infer()? Nothing needs doing.
9191 if !ty. has_non_region_infer ( ) {
9292 debug ! ( "no inference var, nothing needs doing" ) ;
@@ -108,7 +108,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
108108 self . resolve_vars_if_possible ( ty)
109109 }
110110
111- pub ( in super :: super ) fn record_deferred_call_resolution (
111+ pub ( crate ) fn record_deferred_call_resolution (
112112 & self ,
113113 closure_def_id : LocalDefId ,
114114 r : DeferredCallResolution < ' tcx > ,
@@ -117,7 +117,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
117117 deferred_call_resolutions. entry ( closure_def_id) . or_default ( ) . push ( r) ;
118118 }
119119
120- pub ( in super :: super ) fn remove_deferred_call_resolutions (
120+ pub ( crate ) fn remove_deferred_call_resolutions (
121121 & self ,
122122 closure_def_id : LocalDefId ,
123123 ) -> Vec < DeferredCallResolution < ' tcx > > {
@@ -171,7 +171,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
171171 }
172172
173173 #[ instrument( level = "debug" , skip( self ) ) ]
174- pub ( in super :: super ) fn write_resolution (
174+ pub ( crate ) fn write_resolution (
175175 & self ,
176176 hir_id : HirId ,
177177 r : Result < ( DefKind , DefId ) , ErrorGuaranteed > ,
@@ -335,7 +335,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
335335 }
336336
337337 /// Instantiates and normalizes the bounds for a given item
338- pub ( in super :: super ) fn instantiate_bounds (
338+ pub ( crate ) fn instantiate_bounds (
339339 & self ,
340340 span : Span ,
341341 def_id : DefId ,
@@ -348,7 +348,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
348348 result
349349 }
350350
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
352352 where
353353 T : TypeFoldable < TyCtxt < ' tcx > > ,
354354 {
@@ -536,7 +536,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
536536 self . normalize ( span, field. ty ( self . tcx , args) )
537537 }
538538
539- pub ( in super :: super ) fn resolve_rvalue_scopes ( & self , def_id : DefId ) {
539+ pub ( crate ) fn resolve_rvalue_scopes ( & self , def_id : DefId ) {
540540 let scope_tree = self . tcx . region_scope_tree ( def_id) ;
541541 let rvalue_scopes = { rvalue_scopes:: resolve_rvalue_scopes ( self , scope_tree, def_id) } ;
542542 let mut typeck_results = self . typeck_results . borrow_mut ( ) ;
@@ -552,7 +552,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
552552 /// We must not attempt to select obligations after this method has run, or risk query cycle
553553 /// ICE.
554554 #[ instrument( level = "debug" , skip( self ) ) ]
555- pub ( in super :: super ) fn resolve_coroutine_interiors ( & self ) {
555+ pub ( crate ) fn resolve_coroutine_interiors ( & self ) {
556556 // Try selecting all obligations that are not blocked on inference variables.
557557 // Once we start unifying coroutine witnesses, trying to select obligations on them will
558558 // trigger query cycle ICEs, as doing so requires MIR.
@@ -593,7 +593,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
593593 }
594594
595595 #[ instrument( skip( self ) , level = "debug" ) ]
596- pub ( in super :: super ) fn report_ambiguity_errors ( & self ) {
596+ pub ( crate ) fn report_ambiguity_errors ( & self ) {
597597 let mut errors = self . fulfillment_cx . borrow_mut ( ) . collect_remaining_errors ( self ) ;
598598
599599 if !errors. is_empty ( ) {
@@ -608,7 +608,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
608608 }
609609
610610 /// 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 (
612612 & self ,
613613 mutate_fulfillment_errors : impl Fn ( & mut Vec < traits:: FulfillmentError < ' tcx > > ) ,
614614 ) {
@@ -624,7 +624,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
624624 /// returns a type of `&T`, but the actual type we assign to the
625625 /// *expression* is `T`. So this function just peels off the return
626626 /// 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 (
628628 & self ,
629629 method : MethodCallee < ' tcx > ,
630630 ) -> ty:: TypeAndMut < ' tcx > {
@@ -635,7 +635,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
635635 ret_ty. builtin_deref ( true ) . unwrap ( )
636636 }
637637
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 {
639639 let sized_did = self . tcx . lang_items ( ) . sized_trait ( ) ;
640640 self . obligations_for_self_ty ( self_ty) . any ( |obligation| {
641641 match obligation. predicate . kind ( ) . skip_binder ( ) {
@@ -647,15 +647,15 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
647647 } )
648648 }
649649
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 > > {
651651 let ty_error = Ty :: new_misc_error ( self . tcx ) ;
652652 vec ! [ ty_error; len]
653653 }
654654
655655 /// Unifies the output type with the expected type early, for more coercions
656656 /// and forward type information on the input expressions.
657657 #[ 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 (
659659 & self ,
660660 call_span : Span ,
661661 expected_ret : Expectation < ' tcx > ,
@@ -688,7 +688,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
688688 expect_args
689689 }
690690
691- pub ( in super :: super ) fn resolve_lang_item_path (
691+ pub ( crate ) fn resolve_lang_item_path (
692692 & self ,
693693 lang_item : hir:: LangItem ,
694694 span : Span ,
@@ -867,7 +867,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
867867 /// but we often want access to the parent function's signature.
868868 ///
869869 /// Otherwise, return false.
870- pub ( in super :: super ) fn get_node_fn_decl (
870+ pub ( crate ) fn get_node_fn_decl (
871871 & self ,
872872 node : Node < ' tcx > ,
873873 ) -> Option < ( LocalDefId , & ' tcx hir:: FnDecl < ' tcx > , Ident , bool ) > {
@@ -945,7 +945,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
945945 } )
946946 }
947947
948- pub ( in super :: super ) fn note_internal_mutation_in_method (
948+ pub ( crate ) fn note_internal_mutation_in_method (
949949 & self ,
950950 err : & mut Diag < ' _ > ,
951951 expr : & hir:: Expr < ' _ > ,
@@ -1490,7 +1490,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
14901490 }
14911491 }
14921492
1493- pub ( in super :: super ) fn with_breakable_ctxt < F : FnOnce ( ) -> R , R > (
1493+ pub ( crate ) fn with_breakable_ctxt < F : FnOnce ( ) -> R , R > (
14941494 & self ,
14951495 id : HirId ,
14961496 ctxt : BreakableCtxt < ' tcx > ,
@@ -1516,7 +1516,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
15161516
15171517 /// Instantiate a QueryResponse in a probe context, without a
15181518 /// good ObligationCause.
1519- pub ( in super :: super ) fn probe_instantiate_query_response (
1519+ pub ( crate ) fn probe_instantiate_query_response (
15201520 & self ,
15211521 span : Span ,
15221522 original_values : & OriginalQueryValues < ' tcx > ,
@@ -1531,7 +1531,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
15311531 }
15321532
15331533 /// 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 {
15351535 let mut contained_in_place = false ;
15361536
15371537 while let hir:: Node :: Expr ( parent_expr) = self . tcx . parent_hir_node ( expr_id) {
0 commit comments