Skip to content

Gate access_kind_for_place_use AccessKind::Move rule on !prove_ty_is_copy - #448

Open
jackh726 wants to merge 2 commits into
mainfrom
misc-fixes
Open

Gate access_kind_for_place_use AccessKind::Move rule on !prove_ty_is_copy#448
jackh726 wants to merge 2 commits into
mainfrom
misc-fixes

Conversation

@jackh726

@jackh726 jackh726 commented Aug 7, 2026

Copy link
Copy Markdown
Member

What does this PR do?

See the two added tests: the AccessKind::Move rule was being used even when ty is copy.

Question: as @nikomatsakis pointed out to me, it's a bit surprising that the Copy rule doesn't result in a successful program despite the Move rule being selected (i.e. we should try both).

As for to_rust, use status for cargo fmt, not spawn (the former is blocking on the result, the latter is not).

AI disclosure

  • I used an AI to author the main logic of the code

@rustbot

rustbot commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Thanks for contributing to formality! :)
A reviewer will take a look at your PR within a week or two. If not, come talk to us on https://rust-lang.zulipchat.com/#narrow/channel/402470-t-types.2Fformality

)

(
(if !prove_ty_is_copy(env, assumptions, state, &place.ty).is_proven())!

@nikomatsakis nikomatsakis Aug 12, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I feel like this should not be needed, I want to look into this more closely.

View changes since the review

@lqd lqd mentioned this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants