Skip to content

Conversation

@tjhance
Copy link
Collaborator

@tjhance tjhance commented Nov 25, 2025

This calculates fine-grained move information for struct-update expressions (structs with the .., like in {a: x, ..foo}) in order to support such expressions in new-mut-ref.

As a side-effect, mode-checking for these expressions is now a bit more fine-grained, as in, we now allow this corner case:

tracked struct Foo {
    tracked tr: X,
    ghost gh: X,
}

proof fn test(foo: Foo, tracked x: X) {
    // This is ok because we only need the ghost field off of foo
    let tracked foo2 = Foo { tr: x, .. foo };
}

@tjhance tjhance force-pushed the struct-tail-copy-move-fields branch from f15f5c4 to ceff5d8 Compare December 1, 2025 07:42
@tjhance tjhance merged commit 43aa35e into main Dec 1, 2025
12 checks passed
@tjhance tjhance deleted the struct-tail-copy-move-fields branch December 1, 2025 08:20
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.

3 participants