Skip to content

Make diverging_type_vars a vec of TyVid#156048

Open
JonathanBrouwer wants to merge 2 commits intorust-lang:mainfrom
JonathanBrouwer:diverging_ty_vids
Open

Make diverging_type_vars a vec of TyVid#156048
JonathanBrouwer wants to merge 2 commits intorust-lang:mainfrom
JonathanBrouwer:diverging_ty_vids

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer commented May 1, 2026

r? @lcnr

The following changes, in separate commits:

  • Make its elements a TyVid, since there should never by any other types than TyVars in there
  • Make it a vec, since it being a set doesn't make much sense. You never really should do a contains on it, since you should normalize the tyvids in the set to their root var first.

@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 May 1, 2026
@WaffleLapkin WaffleLapkin added the F-never_type `#![feature(never_type)]` label May 1, 2026
It being a `Set` does not really make sense. You never really should do a `contains` on it, since you should normalize the tyvid to its root var first.
@JonathanBrouwer JonathanBrouwer changed the title Make diverging_type_vars a set of TyVid Make diverging_type_vars a vec of TyVid May 1, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue
I don't expect a perf difference, but just in case

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 1, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 1, 2026
Make `diverging_type_vars` a vec of `TyVid`
Copy link
Copy Markdown
Member

@WaffleLapkin WaffleLapkin left a comment

Choose a reason for hiding this comment

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

r=me with green CI/perf, unless lcnr has other opinions

View changes since this review

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 1, 2026

☀️ Try build successful (CI)
Build commit: 624eb28 (624eb28e03452f8c4ab2dd0ec6be19dcc45d53ef, parent: 0469a92a76c327df972cb6c1356934b7a0c6b86d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (624eb28): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (secondary 1.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.4% [1.2%, 3.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary 3.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.4% [2.0%, 5.2%] 11
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.0%, secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.0%] 7
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.0%] 7

Bootstrap: 481.713s -> 481.055s (-0.14%)
Artifact size: 390.96 MiB -> 390.99 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 1, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r=WaffleLapkin rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 1, 2026

📌 Commit c17d24e has been approved by WaffleLapkin

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 May 1, 2026
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 1, 2026
… r=WaffleLapkin

Make `diverging_type_vars` a vec of `TyVid`

r? @lcnr

The following changes, in separate commits:
* Make its elements a `TyVid`, since there should never by any other types than `TyVars` in there
* Make it a vec, since it being a set doesn't make much sense. You never really should do a `contains` on it, since you should normalize the tyvids in the set to their root var first.
rust-bors Bot pushed a commit that referenced this pull request May 1, 2026
Rollup of 7 pull requests

Successful merges:

 - #155940 (refactor rustc_on_unimplemented's filtering)
 - #156020 (Improve source code for `librustdoc/visit_ast.rs`)
 - #156021 (Clean up some traits)
 - #156028 (Add a `Local::arg(i)` helper constructor)
 - #156037 (Add AcceptContext::expect_no_args)
 - #156040 (Add missing alias to mailmap)
 - #156048 (Make `diverging_type_vars` a vec of `TyVid`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-never_type `#![feature(never_type)]` 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.

5 participants