Skip to content

Commit 0fe3432

Browse files
oli-obkfee1-dead
authored andcommitted
Constness is optional now
1 parent 7c5527d commit 0fe3432

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(), 1); // no generics except for constness
457+
assert_eq!(generics.params.len(), generics.has_constness as usize); // 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)