Skip to content

Commit 25be7a4

Browse files
committed
attempt to fix std ice
1 parent 7316ca4 commit 25be7a4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/rustc_typeck/src/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ fn has_expected_num_generic_args<'tcx>(
963963
) -> bool {
964964
trait_did.map_or(true, |trait_did| {
965965
let generics = tcx.generics_of(trait_did);
966-
generics.count() == expected + if generics.has_self { 1 } else { 0 }
966+
generics.count() == expected + if generics.has_self { 1 } else { 0 } + if generics.has_constness { 1 } else { 0 }
967967
})
968968
}
969969

compiler/rustc_typeck/src/check/op.rs

+2
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
859859
self.lookup_op_method_in_trait(span, opname, trait_did, lhs_ty, other_ty, other_ty_expr)
860860
});
861861

862+
debug!("lookup_op_method(method={method:?}");
863+
862864
match (method, trait_did) {
863865
(Some(ok), _) => {
864866
let method = self.register_infer_ok_obligations(ok);

0 commit comments

Comments
 (0)