Debug assert that unevaluated consts have the right substs
This commit is contained in:
parent
4e91cedaed
commit
9368b9f57e
1 changed files with 1 additions and 0 deletions
|
@ -109,6 +109,7 @@ impl<'tcx> Const<'tcx> {
|
|||
|
||||
#[inline]
|
||||
pub fn new_unevaluated(tcx: TyCtxt<'tcx>, uv: ty::UnevaluatedConst<'tcx>) -> Const<'tcx> {
|
||||
tcx.debug_assert_args_compatible(uv.def, uv.args);
|
||||
Const::new(tcx, ty::ConstKind::Unevaluated(uv))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue