Skip to content

Commit 77b4af3

Browse files
committed
Fix assertion ICE
1 parent dd7ec37 commit 77b4af3

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_typeck/src/check/method

1 file changed

+1
-1
lines changed

compiler/rustc_typeck/src/check/method/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
454454
};
455455
let def_id = method_item.def_id;
456456
let generics = tcx.generics_of(def_id);
457-
assert_eq!(generics.params.len(), 0);
457+
assert_eq!(generics.params.len(), 1); // no generics except for constness
458458

459459
debug!("lookup_in_trait_adjusted: method_item={:?}", method_item);
460460
let mut obligations = vec![];

0 commit comments

Comments
 (0)