Skip to content

tests/ui: A New Order [6/N] #142132

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

tests/ui: A New Order [6/N] #142132

wants to merge 1 commit into from

Conversation

Kivooeo
Copy link
Contributor

@Kivooeo Kivooeo commented Jun 6, 2025

Note

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

Some tests/ui/ housekeeping, to trim down number of tests directly under tests/ui/. Part of #133895.

r? @jieyouxu

auxiliary tag means some changes in realted auxiliary file for test

@rustbot
Copy link
Collaborator

rustbot commented Jun 6, 2025

jieyouxu is not on the review rotation at the moment.
They may take a while to respond.

@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 Jun 6, 2025
@Kivooeo Kivooeo changed the title Tf6 tests/ui: A New Order [6/N] Jun 6, 2025
@rust-log-analyzer

This comment has been minimized.

@Kivooeo
Copy link
Contributor Author

Kivooeo commented Jun 6, 2025

btw, i don't like this complex.rs test, it feels like it tests nothing, so if you feels the same way we can remove it i guess

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

Choose a reason for hiding this comment

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

can you leave a comment that points people back to ../cross-crate-method-reexport.rs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

im not sure how exactly this comment should looks like, because i checked other auxiliary files in this directory on none of this files contains something like this

something like?

Original test is located in `tests/ui/cross-crate/cross-crate-method-reexport.rs`

Copy link
Member

Choose a reason for hiding this comment

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

Yes, "used by" is also fine

//! treated as early bound, similar to associated items, rather than late bound as in manual
//! constructors.
//!
//! Related to issue #30904.
Copy link
Member

Choose a reason for hiding this comment

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

howso? pretend I am too lazy to go look at that issue (because I am)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i guess your question is "how this test actually validates the early-bound behavior" so answer is the test proves early-bound behavior by confirming that partial specification fails with the right error message, if these were late-bound, the error messages might be different
it may be not the best way surely but what we have is what we have

(if that's not what your question was about, you could clarify what you meant)

Copy link
Member

Choose a reason for hiding this comment

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

Oh I meant "how does it relate to that issue"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as far as i concerned (cuz issue is still open and problem was not fixed yet): the test is mainly to make sure the lifetime mechanism works right, which we'll need for a fix later on (since person who created this test said in their pr that issue was actually fixed, but in reality it doesnt, so this test more indirect relation with this issue)

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
//! Related to issue #30904.
//! May become a non-error if we fix https://github.com/rust-lang/rust/issues/30904

Copy link
Contributor Author

@Kivooeo Kivooeo Jun 7, 2025

Choose a reason for hiding this comment

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

the errors will still remain after fix, because arguments number does not match the expected one, like here

    S::<'static>(&0, &0);
    //~^ ERROR struct takes 2 lifetime arguments

so i even think about to remove this entire mention of this issue, because it tests slightly different thing

fun part that we had a test for #30904, but it was removed and i cant find this, maybe it was renamed and fully rewritten but i find it hard to believe, here:
https://github.com/JohnTitor/rust/blob/74d45afbf5473d1b255629e786e074060dcc7ec2/src/test/ui/unboxed-closures/issue-30904.rs
if test was really deleted i guess i can add it, because this still true and what issue was about

    let _: for<'a> fn(&'a str) -> Str<'a> = Str;
    //~^ ERROR: mismatched types

Copy link
Member

Choose a reason for hiding this comment

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

Oh, hm.

Yes I think removing the mention of the issue if it's that unrelated is better.

Copy link
Contributor Author

@Kivooeo Kivooeo Jun 7, 2025

Choose a reason for hiding this comment

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

well, yeah, it was deleted in this commit
564c78a#diff-85d65712084246fc61f287664eef63b0b25ba0a5c8b69a4a59a9454b6a3ebac4

but then issue was reopened and test was not brought back, i guess i can add it in separate pr

@Kivooeo
Copy link
Contributor Author

Kivooeo commented Jun 7, 2025

also if you want and agree with changes, i guess, i can squash it so you could r+

@workingjubilee
Copy link
Member

Yes, I'll sign off on this one.

@Kivooeo
Copy link
Contributor Author

Kivooeo commented Jun 7, 2025

okie, i will ping you as soon as ci passed then

@workingjubilee
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 7, 2025

📌 Commit 610b7a3 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors 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 Jun 7, 2025
@rust-log-analyzer

This comment has been minimized.

@Kivooeo
Copy link
Contributor Author

Kivooeo commented Jun 7, 2025

fixed the last error with stderr, not actually sure if it should be readded to bors as new commit

@workingjubilee
Copy link
Member

oh.

yes.

@bors r-
@bors r+ rollup

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 7, 2025
@bors
Copy link
Collaborator

bors commented Jun 7, 2025

📌 Commit 3380a91 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 7, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 7, 2025
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.

6 participants