Skip to content

Reorganisation of UI Tests#153962

Open
rishi-techo-14 wants to merge 2 commits intorust-lang:mainfrom
rishi-techo-14:ui-tests-reorg-v2
Open

Reorganisation of UI Tests#153962
rishi-techo-14 wants to merge 2 commits intorust-lang:mainfrom
rishi-techo-14:ui-tests-reorg-v2

Conversation

@rishi-techo-14
Copy link
Copy Markdown

@rishi-techo-14 rishi-techo-14 commented Mar 16, 2026

View all comments

Reorganize 11 tests in tests/ui/issues to appropriate subdirectories

This PR reorganizes tests in tests/ui/issues folder following the workflow suggested in the comment on #149411

Workflow:

  • Move 11 tests to appropriate directories (such as pattern, typeck, traits, borrowck, closures).
  • Rename each test in {reason}-issue-xxxx.rs format along with its corresponding .stderr file
  • Add issue links and short description about what the test checks

All tests pass tidy locally using

python x.py test tidy

@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 16, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 16, 2026

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 15 candidates

@rishi-techo-14
Copy link
Copy Markdown
Author

@rustbot r? @Kivooeo

@rustbot rustbot assigned Kivooeo and unassigned JohnTitor Mar 16, 2026
Copy link
Copy Markdown
Member

@Kivooeo Kivooeo left a comment

Choose a reason for hiding this comment

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

Remove the word "issue" from all test names and remove the issue numbers from those tests whose names are descriptive enough.

View changes since this review

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Mar 16, 2026

Also, remove the comments describing what the test is doing if the test is simple enough. However, keep an issue link and add a new line between your comment and the test.

Here's an example of what the test could look like: #152732.

@rust-log-analyzer

This comment has been minimized.

@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/4265
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.

This should not be moved to ui/traits, there are no traits involved at all.

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.

Maybe put this in ui/methods instead?

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Mar 17, 2026

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 17, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 17, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rishi-techo-14
Copy link
Copy Markdown
Author

@rustbot ready
I've finished the reorganization and cleanup. All 11 tests are successfully named and relocated, and tidy passes locally.
NOTE: My Windows PC is crashing(0xc0000005) during the full build when i try to run "python x.py test tests/ui --bless ", so I couldn't bless the .stderr files. I've pushed the changes so they can be blessed through CI.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 20, 2026
@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Mar 20, 2026

've pushed the changes so they can be blessed through CI.

What do you mean by that

@rust-log-analyzer

This comment has been minimized.

@rishi-techo-14
Copy link
Copy Markdown
Author

I was referring to the @rustbot bless command.
I am unable to to run python x.py test tests/ui --bless on my local machine because the build consistently fails with a STATUS_ACCESS_VIOLATION (0xc0000005) while compiling library/core, which prevents me from running python x.py test tests/ui --bless myself.
So, since I can't generate the updated .stderr files locally due to the environment crash, I was hoping a maintainer could trigger @rustbot bless once the PR passes tidy, or kindly guide me if there is a way to trigger the CI-bless myself.

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Mar 20, 2026

there is no CI-bless command or any way to do so... I think the best way you can do is run ./x test ui, then check what tests are failing and do ./x test path/to/test --bless by one on each failed test

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Mar 20, 2026

Oh, I see. You can't run the compile test because you can't build the library. In that case, I could try pushing these changes directly into your branch.

I'm not sure how feasible this is for GSoC, but we could give you access to our cloud computing if you were chosen for the project.

@rishi-techo-14
Copy link
Copy Markdown
Author

Hey @Kivooeo and @cyrgani! I rectified the issues I was facing in my local Windows (regarding the STATUS_ACCESS_VIOLATION issues ) by performing a full Stage 1 Bootstrap and then blessing the 7 folders in tests/ui.
Since all the checks are passed, I would like to present to a final review of this PR, whenever you could have a moment. Thank you.

@rishi-techo-14
Copy link
Copy Markdown
Author

@rustbot ready

@rishi-techo-14
Copy link
Copy Markdown
Author

@rustbot ready

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 8, 2026

can you squash the commits the way i explained in comment below, it's so hard to review at current state

this comment should be clear enough #149411 (comment) to make it correct, if not - please, ask questions

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 8, 2026

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 8, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 8, 2026

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann, @JonathanBrouwer

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs A-tidy Area: The tidy tool T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 8, 2026
@rustbot

This comment has been minimized.

-Rename tests for clarity.
-Add issue links and descriptions.
-Clean up formatting and comments.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 8, 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.

@rishi-techo-14
Copy link
Copy Markdown
Author

Thanks for pointing this out. I've squashed the commits the way said in comment on #149411.

@rishi-techo-14
Copy link
Copy Markdown
Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 9, 2026
@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 9, 2026

move and rename in first commit and everything that touches its content in second (comment, bless, fmt, etc.)

@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/4736
Copy link
Copy Markdown
Contributor

@cyrgani cyrgani Apr 9, 2026

Choose a reason for hiding this comment

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

View changes since the review

I don't think this belongs in ui/typeck. ui/structs seems more appropriate.

@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/4265
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.

Maybe put this in ui/methods instead?

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs A-tidy Area: The tidy tool S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

6 participants