mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Debug assert that unevaluated consts have the right substs
This commit is contained in:
parent
4e91cedaed
commit
9368b9f57e
@ -109,6 +109,7 @@ impl<'tcx> Const<'tcx> {
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new_unevaluated(tcx: TyCtxt<'tcx>, uv: ty::UnevaluatedConst<'tcx>) -> Const<'tcx> {
|
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))
|
Const::new(tcx, ty::ConstKind::Unevaluated(uv))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user