Improve borrowck field-sensitivity tests#14717
Closed
zwarich wants to merge 5 commits intorust-lang:masterfrom
zwarich:borrowck-tests
Closed
Improve borrowck field-sensitivity tests#14717zwarich wants to merge 5 commits intorust-lang:masterfrom zwarich:borrowck-tests
zwarich wants to merge 5 commits intorust-lang:masterfrom
zwarich:borrowck-tests
Conversation
added 5 commits
June 7, 2014 02:30
Some of the borrowck field-sensitivity test functions have 'use' in their name, but they don't refer to the specific kind of use (whether a copy or a deref). It would be better if the name more precisely reflected what the function is testing.
A number of borrowck field-sensitivity tests perform more moves and copies than their naming scheme would indicate. This is only necessary for borrowed pointers (to ensure that the borrowws stay alive in the near future when borrow liveness is tracked), but all other test functions should be changed to match their name more closely.
Add more borrowck field-sensitivity tests for functional update moves. This makes the collection of test functions more combinatorially exhaustive.
The move_after_borrow / fu_move_after_borrow tests in run-pass/borrowck-field-sensitivity.rs are not testing the right thing, since the scope of the borrow is limited to the call to borrow(). When fixed, these tests fail and thus should be moved to the corresponding compile-fail test file.
Instead of calling a borrow() function that takes a pointer type, just create a local pointer and dereference it. The dereference is there to outsmart any future liveness analysis in borrowck.
bors
added a commit
that referenced
this pull request
Jun 7, 2014
After sitting down to build on the work merged in #14318, I realized that some of the test names were not clear, others probably weren't testing the right thing, and they were also not as exhaustive as they could have been.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 5, 2023
internal: Use `triomphe::Arc` Closes rust-lang#14717
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
May 15, 2025
Supersedes rust-lang/rust-clippy#12550 `layout_of` no longer contains a `delay_bug` so there's no need for this anymore. changelog: None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After sitting down to build on the work merged in #14318, I realized that some of the test names were not clear, others probably weren't testing the right thing, and they were also not as exhaustive as they could have been.