Skip to content

Commit e7e620d

Browse files
committed
Rename ConfirmResult fields
1 parent 2e8e75f commit e7e620d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/librustc_typeck/check/method/confirm.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl<'a, 'gcx, 'tcx> Deref for ConfirmContext<'a, 'gcx, 'tcx> {
4040

4141
pub struct ConfirmResult<'tcx> {
4242
pub callee: MethodCallee<'tcx>,
43-
pub rerun: bool,
43+
pub illegal_sized_bound: bool,
4444
}
4545

4646
impl<'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
///////////////////////////////////////////////////////////////////////////

src/librustc_typeck/check/method/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
170170
pick.clone(),
171171
segment);
172172

173-
if result.rerun {
173+
if result.illegal_sized_bound {
174174
// We probe again, taking all traits into account (not only those in scope).
175175
let candidates =
176176
match self.lookup_probe(span,

0 commit comments

Comments
 (0)