@@ -40,7 +40,7 @@ impl<'a, 'gcx, 'tcx> Deref for ConfirmContext<'a, 'gcx, 'tcx> {
4040
4141pub struct ConfirmResult < ' tcx > {
4242 pub callee : MethodCallee < ' tcx > ,
43- pub rerun : bool ,
43+ pub illegal_sized_bound : bool ,
4444}
4545
4646impl < ' a , ' gcx , ' tcx > FnCtxt < ' a , ' gcx , ' tcx > {
@@ -99,20 +99,20 @@ impl<'a, 'gcx, 'tcx> ConfirmContext<'a, 'gcx, 'tcx> {
9999 // If there is a `Self: Sized` bound and `Self` is a trait object, it is possible that
100100 // something which derefs to `Self` actually implements the trait and the caller
101101 // wanted to make a static dispatch on it but forgot to import the trait.
102- // See test `src/test/compile-fail /issue-35976.rs`.
102+ // See test `src/test/ui /issue-35976.rs`.
103103 //
104104 // In that case, we'll error anyway, but we'll also re-run the search with all traits
105105 // in scope, and if we find another method which can be used, we'll output an
106106 // appropriate hint suggesting to import the trait.
107- let rerun = self . predicates_require_illegal_sized_bound ( & method_predicates) ;
107+ let illegal_sized_bound = self . predicates_require_illegal_sized_bound ( & method_predicates) ;
108108
109109 // Unify the (adjusted) self type with what the method expects.
110110 self . unify_receivers ( self_ty, method_sig. inputs ( ) [ 0 ] ) ;
111111
112112 // Add any trait/regions obligations specified on the method's type parameters.
113113 // We won't add these if we encountered an illegal sized bound, so that we can use
114114 // a custom error in that case.
115- if !rerun {
115+ if !illegal_sized_bound {
116116 let method_ty = self . tcx . mk_fn_ptr ( ty:: Binder ( method_sig) ) ;
117117 self . add_obligations ( method_ty, all_substs, & method_predicates) ;
118118 }
@@ -128,7 +128,7 @@ impl<'a, 'gcx, 'tcx> ConfirmContext<'a, 'gcx, 'tcx> {
128128 self . convert_lvalue_derefs_to_mutable ( ) ;
129129 }
130130
131- ConfirmResult { callee, rerun }
131+ ConfirmResult { callee, illegal_sized_bound }
132132 }
133133
134134 ///////////////////////////////////////////////////////////////////////////
0 commit comments