Ensure uniqueness of intermediate variables in expect_type_assign

For recursive structures like Tuples, the span itself isn't enough to
  ensure uniqueness of elements (in particular tuples) holding elements
  of the same type.
This commit is contained in:
KtorZ
2024-09-01 18:08:20 +02:00
parent 8d60f08f65
commit 53af366b59
2 changed files with 37 additions and 14 deletions

View File

@@ -10,7 +10,10 @@ pub const CONSTR_INDEX_EXPOSER: &str = "__constr_index_exposer";
pub const EXPECT_ON_LIST: &str = "__expect_on_list";
pub const INNER_EXPECT_ON_LIST: &str = "__inner_expect_on_list";
impl<T> Term<T> {
impl<T> Term<T>
where
T: std::fmt::Debug,
{
// Terms
pub fn apply(self, arg: Self) -> Self {
Term::Apply {
@@ -391,7 +394,10 @@ impl<T> Term<T> {
}
}
impl<T> Term<T> {
impl<T> Term<T>
where
T: std::fmt::Debug,
{
pub fn delayed_choose_data(
self,
constr_case: Self,