1
Fork 0

intern valtrees

This commit is contained in:
Lukas Markeffsky 2025-02-07 19:33:58 +01:00
parent ef148cd7eb
commit 885e0f1b96
15 changed files with 149 additions and 117 deletions

View file

@ -494,7 +494,7 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
let scalar = ScalarInt::try_from_uint(value, size).ok_or_else(|| {
Error::new(format!("Value overflow: cannot convert `{value}` to `{ty}`."))
})?;
Ok(ty::Const::new_value(tables.tcx, ValTree::from_scalar_int(scalar), ty)
Ok(ty::Const::new_value(tcx, ValTree::from_scalar_int(tcx, scalar), ty)
.stable(&mut *tables))
}