Skip to content

Fix wands#132

Draft
JonasAlaif wants to merge 1 commit intoAurel300:rewrite-2023from
viperproject:fix-wands
Draft

Fix wands#132
JonasAlaif wants to merge 1 commit intoAurel300:rewrite-2023from
viperproject:fix-wands

Conversation

@JonasAlaif
Copy link
Collaborator

It seems that the new function shape encoding doesn't seem to work. For example, the following example from the PCG paper fails.

struct Pos2D<T> { x: T, y: T }

fn max<'r, 'a: 'r, 'b: 'r>(rx: &'a mut i32, ry: &'b mut i32) -> &'r mut i32 {
    if *rx > *ry { &mut *rx } else { &mut *ry }
}

fn dec_max_alt<'a>(pos: &'a mut Pos2D<i32>) {
    let rx = &mut pos.x;
    let ry = &mut pos.y;
    let res = max(rx, ry);
    *res -= 1;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant