Skip to content

Conversation

@reddevilmidzy
Copy link
Contributor

@reddevilmidzy reddevilmidzy commented Nov 29, 2025

Note

Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge.

part of #133895

removed directory tests/ui/trait-objects, tests/ui/for, tests/ui/warnings

trait-objects -> traits/object
for -> for-loop-while (except for/issue-20605.rs test. this relocated to traits/dyn-iterator-deref-in-for-loop.rs)
warnings -> resolve, entry-point

r? Kivooeo

@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 Nov 29, 2025
@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor Author

@reddevilmidzy reddevilmidzy left a comment

Choose a reason for hiding this comment

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

Are there any guides or samples for writing SUMMARY.md? because of this comment in the tests/ui/README.md
FIXME: After ui/for is merged into this, also carry over its SUMMARY text.

thanks:)

View changes since this review

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since there was only one test in the trait-object directory (and it wasn't in README.md), I moved it to traits/object.

Comment on lines +8 to +13
fn changer<'a>(mut things: Box<dyn Iterator<Item = &'a mut u8>>) {
for item in *things {
//~^ ERROR `dyn Iterator<Item = &'a mut u8>` is not an iterator
*item = 0
}
}
Copy link
Contributor Author

@reddevilmidzy reddevilmidzy Nov 29, 2025

Choose a reason for hiding this comment

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

I have a quastion.
Can it be considered the same as for-loop-while/iter-from-mac-call.rs and traits/dyn-iterator-deref-in-for-loop?
When this test was first added, there were no special flags. 3a62590

Copy link
Member

Choose a reason for hiding this comment

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

I feel like it's fine to consider them as the same test, because this two functions are basically the same, you maybe could remove this f1 function and keep traits/dyn-iterator-deref-in-for-loop

@rustbot
Copy link
Collaborator

rustbot commented Nov 29, 2025

The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes.

cc @BoxyUwU, @jieyouxu, @Kobzol, @tshepang

@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 29, 2025
@rustbot

This comment has been minimized.

@reddevilmidzy
Copy link
Contributor Author

ooops sorry rebase mistake

@reddevilmidzy reddevilmidzy force-pushed the t6 branch 2 times, most recently from 043ba31 to 60dcb6f Compare November 29, 2025 04:37
@rustbot
Copy link
Collaborator

rustbot commented Nov 29, 2025

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.

@reddevilmidzy
Copy link
Contributor Author

@rustbot label -A-rustc-dev-guide -A-testsuite

@rustbot rustbot removed A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc labels Nov 29, 2025
@BoxyUwU
Copy link
Member

BoxyUwU commented Nov 29, 2025

personally I would prefer to keep trait object tests as their own directory rather than being nested under traits. what's the reason for wanting to move it there?

@Kivooeo
Copy link
Member

Kivooeo commented Nov 29, 2025

traits/object already contains a numerous amount of tests, so it's more like return lost test to its home, and I believe having traits/object is to keep things in their own place, for example

if person wants to add a test for const traits, they know that this is traits, so they start search for the proper directory in traits/ , and yes , there is a traits/const-trait, the same story with traits/object

so my vision is we want "to keep things in their proper place" / "to have everything in order" / "to be organized" / "to have a system", and this what subdirectories made for

Copy link
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.

Are there any guides or samples for writing SUMMARY.md?

This is a bit old information, because originally this file was named SUMMARY.md, and then was renamed to README.md

So answer is no, you just briefly explain a structure of test directories and what kind of test should be contained in each directory or what this directory purpose is, so other developers can use this as map in tests/ui

Feel free to just cut text from tests/ui/for/ to tests/ui/for-loop-while/ instead of this fixme

Remove this f1 function, and then rebase

View changes since this review

@reddevilmidzy
Copy link
Contributor Author

personally I would prefer to keep trait object tests as their own directory rather than being nested under traits. what's the reason for wanting to move it there?

Currently, the trait-object and traits/object directories coexist. I thought it was time to merge them. Since the traits directory already had many subdirectories, and traits/object already had many tests, I thought it would make more sense to move trait-object to traits/object!

remove `tests/ui/for-loop-while/iter-from-mac-call.rs`
duplicated of `tests/ui/traits/dyn-iterator-deref-in-for-loop.rs`

update `tests/ui/README.md`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

5 participants