@@ -40,7 +40,7 @@ impl<'a, 'gcx, 'tcx> Deref for ConfirmContext<'a, 'gcx, 'tcx> {
40
40
41
41
pub struct ConfirmResult < ' tcx > {
42
42
pub callee : MethodCallee < ' tcx > ,
43
- pub rerun : bool ,
43
+ pub illegal_sized_bound : bool ,
44
44
}
45
45
46
46
impl < ' a , ' gcx , ' tcx > FnCtxt < ' a , ' gcx , ' tcx > {
@@ -99,20 +99,20 @@ impl<'a, 'gcx, 'tcx> ConfirmContext<'a, 'gcx, 'tcx> {
99
99
// If there is a `Self: Sized` bound and `Self` is a trait object, it is possible that
100
100
// something which derefs to `Self` actually implements the trait and the caller
101
101
// 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`.
103
103
//
104
104
// In that case, we'll error anyway, but we'll also re-run the search with all traits
105
105
// in scope, and if we find another method which can be used, we'll output an
106
106
// 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) ;
108
108
109
109
// Unify the (adjusted) self type with what the method expects.
110
110
self . unify_receivers ( self_ty, method_sig. inputs ( ) [ 0 ] ) ;
111
111
112
112
// Add any trait/regions obligations specified on the method's type parameters.
113
113
// We won't add these if we encountered an illegal sized bound, so that we can use
114
114
// a custom error in that case.
115
- if !rerun {
115
+ if !illegal_sized_bound {
116
116
let method_ty = self . tcx . mk_fn_ptr ( ty:: Binder ( method_sig) ) ;
117
117
self . add_obligations ( method_ty, all_substs, & method_predicates) ;
118
118
}
@@ -128,7 +128,7 @@ impl<'a, 'gcx, 'tcx> ConfirmContext<'a, 'gcx, 'tcx> {
128
128
self . convert_lvalue_derefs_to_mutable ( ) ;
129
129
}
130
130
131
- ConfirmResult { callee, rerun }
131
+ ConfirmResult { callee, illegal_sized_bound }
132
132
}
133
133
134
134
///////////////////////////////////////////////////////////////////////////
0 commit comments