Skip to content

Commit 18373fa

Browse files
committed
Debug assertions hate this trick
1 parent 4953666 commit 18373fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_middle/src/ty/context.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2577,17 +2577,17 @@ impl<'tcx> TyCtxt<'tcx> {
25772577
#[inline(always)]
25782578
fn check_substs(
25792579
self,
2580-
def_id: DefId,
2580+
_def_id: DefId,
25812581
substs: impl IntoIterator<Item = impl Into<GenericArg<'tcx>>>,
25822582
) -> SubstsRef<'tcx> {
25832583
let substs = substs.into_iter().map(Into::into);
25842584
#[cfg(debug_assertions)]
25852585
{
2586-
let n = self.generics_of(def_id).count();
2586+
let n = self.generics_of(_def_id).count();
25872587
assert_eq!(
25882588
(n, Some(n)),
25892589
substs.size_hint(),
2590-
"wrong number of generic parameters for {def_id:?}: {:?}",
2590+
"wrong number of generic parameters for {_def_id:?}: {:?}",
25912591
substs.collect::<Vec<_>>(),
25922592
);
25932593
}

0 commit comments

Comments
 (0)