Skip to content

move borrow checker tests#154473

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
danieljofficial:move-tests-borrowck
Apr 8, 2026
Merged

move borrow checker tests#154473
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
danieljofficial:move-tests-borrowck

Conversation

@danieljofficial
Copy link
Copy Markdown
Contributor

@danieljofficial danieljofficial commented Mar 27, 2026

Hi, I have moved some tests I think should be in the borrowck category. Please let me know if there are issues. r? @Kivooeo
Related to #133895

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 27, 2026
@rust-bors

This comment has been minimized.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 29, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Copy link
Copy Markdown
Contributor

@ujjwalvishwakarma2006 ujjwalvishwakarma2006 Apr 7, 2026

Choose a reason for hiding this comment

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

Hey, I think it would be helpful to include the corresponding issue link near the top of the file. It's a bit hectic to search for the issue by number instead of having a direct link in the code. This way, one can easily ctrl + click on the link or use the gf or ge motion in Vim or Neovim.

I am unsure if other reviewers have the same opinion. If they do, please update in all such files ( :
If you want to make it more beautiful, you can put the link in between angle brackets <>.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hey, I think it would be helpful to include the corresponding issue link near the top of the file. It's a bit hectic to search for the issue by number instead of having a direct link in the code. This way, one can easily ctrl + click on the link or use the gf or ge motion in Vim or Neovim.

I am unsure if other reviewers have the same opinion. If they do, please update in all such files ( : If you want to make it more beautiful, you can put the link in between angle brackets <>.

Must have missed those three, thank you.

Copy link
Copy Markdown
Contributor

@ujjwalvishwakarma2006 ujjwalvishwakarma2006 Apr 8, 2026

Choose a reason for hiding this comment

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

Although tests/ui/borrowck is still a better choice in my opinion, it may also belong to following:

  • tests/ui/lifetimes: Because variable line doesn't live long enough, and the description of tests/ui/lifetimes in the tests/ui/README.md says:

Broad directory on lifetimes, including proper specifiers, lifetimes not living long enough, or undeclared lifetime names.

But, since it's the job of the borrow-checker to handle this functionality, your choice is better. It's just another option.

Personal opinion 1: The file name can be prefixed with add- so that it will become add-assign-...; just clearer.

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.

Copy link
Copy Markdown
Contributor

@ujjwalvishwakarma2006 ujjwalvishwakarma2006 Apr 7, 2026

Choose a reason for hiding this comment

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

Ah sorry I forgot, this one too ( :

Copy link
Copy Markdown
Contributor

@ujjwalvishwakarma2006 ujjwalvishwakarma2006 left a comment

Choose a reason for hiding this comment

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

There is one more thing that randomly hit my mind when I was having dinner. Some of these test files do not contain any compiletest directives. You can try adding them.

I think the default directive is run-pass, which is costly. Therefore, if we can use check-pass or build-pass, it would be better.

View changes since this review

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 8, 2026

I think the default directive is run-pass

default is check-fail

@ujjwalvishwakarma2006
Copy link
Copy Markdown
Contributor

I think the default directive is run-pass

default is check-fail

Oh. got it.

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 8, 2026

cool, thanks and sorry for a delay a lot of stuff has happened latelyyyyy

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 8, 2026

📌 Commit d8c8028 has been approved by Kivooeo

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 8, 2026
rust-bors bot pushed a commit that referenced this pull request Apr 8, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #153995 (Use convergent attribute to funcs for GPU targets)
 - #154184 (stabilize s390x vector registers)
 - #151898 (constify DoubleEndedIterator)
 - #154235 (remove unnecessary variables and delimiter check)
 - #154473 (move borrow checker tests)
 - #154745 (Replace span_look_ahead with span_followed_by)
 - #154778 (make field representing types invariant over the base type)
 - #154867 (Fix private fields diagnostics and improve error messages)
 - #154879 (Don't store `pattern_ty` in `TestableCase`)
 - #154910 (Suppress `unreachable_code` lint in `derive(PartialEq, Clone)`)
 - #154923 (Fix ICE in next-solver dyn-compatibility check)
 - #154934 (Add getters for `rustc_pattern_analysis::constructor::Slice` fields)
 - #154938 (match exhaustiveness: Show the guard exhaustivity note only when it's the guards alone that cause non-exhaustiveness)
 - #154961 (Use derived impl for `GappedRange` subdiagnostic)
 - #154980 (rustc-dev-guide subtree update)
@rust-bors rust-bors bot merged commit 4ba9940 into rust-lang:main Apr 8, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 8, 2026
rust-timer added a commit that referenced this pull request Apr 8, 2026
Rollup merge of #154473 - danieljofficial:move-tests-borrowck, r=Kivooeo

move borrow checker tests

Hi, I have moved some tests I think should be in the borrowck category. Please let me know if there are issues.  r? @Kivooeo
Related to #133895
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants