Skip to content

tests/ui: A New Order [19/N] #143210

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

Merged
merged 2 commits into from
Jul 1, 2025
Merged

tests/ui: A New Order [19/N] #143210

merged 2 commits into from
Jul 1, 2025

Conversation

Kivooeo
Copy link
Contributor

@Kivooeo Kivooeo commented Jun 29, 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? @tgross35

@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 29, 2025
@Kivooeo
Copy link
Contributor Author

Kivooeo commented Jun 29, 2025

I've dropped a lot of work on your head all of a sudden... Just doing my work... I hope you don't mind 😅

Comment on lines 6 to 13

let s = "\u{2a10}\u{2A01}\u{2Aa0}";
assert_eq!(s, "⨐⨁⪠");

let s = "\\{20}";
let mut correct_s = String::from("\\");
correct_s.push_str("{20}");
assert_eq!(s, correct_s);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, somehow randomly were deleted and I missed it

I'll return it

Comment on lines 9 to 13
struct NotSyncStruct {
value: isize,
}

impl !Sync for NotSyncStruct {}
Copy link
Contributor

Choose a reason for hiding this comment

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

NotSyncStruct -> NotSync, we avoid Hungarian Notation in Rust

Comment on lines 20 to 31
let mv = myvec(vec![1, 2, 3]);
let mv_clone = mv.clone();
let mv_clone = myvec_deref(mv_clone);
assert_eq!(mv_clone[1], 2);
assert_eq!(myvec_elt(mv.clone()), 1);
let myvec(v) = mv;
assert_eq!(v[2], 3);
let my_vec = MyVec(vec![1, 2, 3]);
let cloned_vec = my_vec.clone();

// Test extracting inner vector
let extracted = extract_inner_vec(cloned_vec);
assert_eq!(extracted[1], 2);

// Test getting first element
assert_eq!(get_first_element(my_vec.clone()), 1);

// Test direct destructuring
let MyVec(inner) = my_vec;
assert_eq!(inner[2], 3);
Copy link
Contributor

Choose a reason for hiding this comment

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

Mind keeping the original var names here? They're understandable enough so IMO not worth any churn.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

honestly, they might be undestandable, but we can do better, right?

myvec_elt for me is not understanable and fused spelling is not good here like myvec, just adding _ make it way better my_vec

Copy link
Contributor

Choose a reason for hiding this comment

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

The function names indeed aren't a very clear and those changes seemed fine. I was talking specifically about variable names; mv->my_vec and mv_clone->cloned_vec doesn't really make anything more clear, so in these cases I'd lean toward preferring the existing code to keep churn down.

All the same, 🤷‍♂️

@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 Jun 30, 2025
@tgross35
Copy link
Contributor

I've dropped a lot of work on your head all of a sudden... Just doing my work... I hope you don't mind 😅

It's not a problem! I think anybody can review these though, you don't need to request me in particular. (I would recommend only having two commits per PR for anyone else though so history looks final, per #143195 (comment). Jieyou may have different preferences, I know he originally requested them to be split).

@Kivooeo
Copy link
Contributor Author

Kivooeo commented Jun 30, 2025

I thought there are people who don't like reviewing tests, and then there are people who have more important work to do, so I try not to bother them

@Kivooeo
Copy link
Contributor Author

Kivooeo commented Jun 30, 2025

@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 Jun 30, 2025
@tgross35
Copy link
Contributor

tgross35 commented Jul 1, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 1, 2025

📌 Commit bf5910d has been approved by tgross35

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 Jul 1, 2025
@tgross35
Copy link
Contributor

tgross35 commented Jul 1, 2025

I thought there are people who don't like reviewing tests, and then there are people who have more important work to do, so I try not to bother them

I mean... we all have more to do than reviewing tests 😆 but this is a team effort. If somebody says no you can always reroll me.

Btw you can about 4x the size of these PRs when you're sending them to me, no need to split things up quite so much. (I know Jieyou had other preferences here but personally I find it less of a task to review related changes together)

bors added a commit that referenced this pull request Jul 1, 2025
Rollup of 12 pull requests

Successful merges:

 - #136801 (Implement `Random` for tuple)
 - #141867 (Describe Future invariants more precisely)
 - #142760 (docs(fs): Touch up grammar on lock api)
 - #143181 (Improve testing and error messages for malformed attributes)
 - #143210 (`tests/ui`: A New Order [19/N] )
 - #143212 (`tests/ui`: A New Order [20/N])
 - #143230 ([COMPILETEST-UNTANGLE 2/N] Make some compiletest errors/warnings/help more visually obvious)
 - #143240 (Port `#[rustc_object_lifetime_default]` to the new attribute parsing …)
 - #143255 (Do not enable LLD by default in the dist profile)
 - #143262 (mir: Mark `Statement` and `BasicBlockData` as `#[non_exhaustive]`)
 - #143269 (bootstrap: make comment more clear)
 - #143279 (Remove `ItemKind::descr` method)

Failed merges:

 - #143237 (Port `#[no_implicit_prelude]` to the new attribute parsing infrastructure)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ff0a5f5 into rust-lang:master Jul 1, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 1, 2025
rust-timer added a commit that referenced this pull request Jul 1, 2025
Rollup merge of #143210 - Kivooeo:tf19, r=tgross35

`tests/ui`: A New Order [19/N]

> [!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? `@tgross35`
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