-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Tidying up UI tests [6/N] #149443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Tidying up UI tests [6/N] #149443
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this 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:)
There was a problem hiding this comment.
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.
| 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 | ||
| } | ||
| } |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
|
The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. 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. |
This comment has been minimized.
This comment has been minimized.
|
ooops sorry rebase mistake |
043ba31 to
60dcb6f
Compare
|
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. |
|
@rustbot label -A-rustc-dev-guide -A-testsuite |
|
personally I would prefer to keep trait object tests as their own directory rather than being nested under |
|
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 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 |
There was a problem hiding this 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
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`
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/warningstrait-objects->traits/objectfor->for-loop-while(exceptfor/issue-20605.rstest. this relocated totraits/dyn-iterator-deref-in-for-loop.rs)warnings->resolve,entry-pointr? Kivooeo