Skip to content

Conversation

@Kivooeo
Copy link
Member

@Kivooeo Kivooeo commented Jan 2, 2026

r? BoxyUwU

part of #132980

fixes #136379
fixes #138132

fixes #150610

i tried to keep implementation very minimal and it's very similar to how structs was implemented with small adjustments

this does not make const constructor like None works, just something like Some(n)

todo:

  • tests
  • write a better description (not sure if needed)
  • add more comments and FIXMEs from structs code

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 2, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 2, 2026

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 2, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the tuple-struct branch 2 times, most recently from a0bf18e to cdcbdff Compare January 3, 2026 17:04
Copy link
Member Author

@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.

the ci will fail, it's excepted, the reason is because there two fixed ICEs in crashes

    [crashes] tests/crashes/136379.rs
    [crashes] tests/crashes/138132.rs

they seems very irrelevant so i decided not to put them out from this directory

View changes since this review

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@BoxyUwU BoxyUwU left a comment

Choose a reason for hiding this comment

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

@BoxyUwU
Copy link
Member

BoxyUwU commented Jan 4, 2026

The ICEs will have been fixed by your changes to lower_resolved_const_path to correctly handle paths to struct/variant tuple constructors. If you could add a test for const arguments such as Foo<{ Struct }> and Foo<{ Enum::Variant }> where Struct and Variant are both defined with tuple constructors that would be great. (Then you can delete the crashes tests)

@Kivooeo Kivooeo marked this pull request as ready for review January 4, 2026 11:27
@rustbot
Copy link
Collaborator

rustbot commented Jan 4, 2026

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

HIR ty lowering was modified

cc @fmease

@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 Jan 4, 2026
@rust-log-analyzer

This comment has been minimized.

@Kivooeo
Copy link
Member Author

Kivooeo commented Jan 4, 2026

hm, weird because locally it's fine

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Kivooeo
Copy link
Member Author

Kivooeo commented Jan 4, 2026

This was the reason of this ICE

accepts_enum::<{ MyEnum::Unit() }>();

So I removed this test case, it was here because locally it worked fine, but seems like in CI it hits some debug assert or something

Seems like it's better to not touch const constructors in any way for this PR

I was aware of ICE when

accepts_enum::<{ MyEnum::Unit }>();

But with parenthesis was working kinda fine, it gave this error locally without ICE

error: tuple constructor with invalid base path
  --> /home/gh-Kivooeo/test_/src/main.rs:23:22
   |
23 |     accepts_enum::<{ MyEnum::Unit() }>();
   |                      ^^^^^^^^^^^^

@Kivooeo
Copy link
Member Author

Kivooeo commented Jan 4, 2026

oh wow ci passed

i will take a look for const constructor a bit later, there shouldn't be much work, like basically update lower_type_relative_const_path and lower_resolved_const_path

Copy link
Member

@BoxyUwU BoxyUwU left a comment

Choose a reason for hiding this comment

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

thx for working on this. very cool!

@bors r+ rollup=never

View changes since this review

@BoxyUwU
Copy link
Member

BoxyUwU commented Jan 4, 2026

ah does bors not pick up from approve messages..

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Jan 4, 2026

📌 Commit 05afcb6 has been approved by BoxyUwU

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 Jan 4, 2026
bors added a commit that referenced this pull request Jan 4, 2026
MGCA: Support for tuple constructors

r? BoxyUwU

part of #132980

fixes #136379
fixes #138132

i tried to keep implementation very minimal and it's very similar to how structs was implemented with small adjustments

this does not make const constructor like None works, just something like Some(n)

todo:
* ~~tests~~
* write a better description (not sure if needed)
* add more comments and FIXMEs from structs code
@bors
Copy link
Collaborator

bors commented Jan 4, 2026

⌛ Testing commit 05afcb6 with merge a60afb2...

bors added a commit that referenced this pull request Jan 5, 2026
MGCA: Support for tuple constructors

r? BoxyUwU

part of #132980

fixes #136379
fixes #138132

i tried to keep implementation very minimal and it's very similar to how structs was implemented with small adjustments

this does not make const constructor like None works, just something like Some(n)

todo:
* ~~tests~~
* write a better description (not sure if needed)
* add more comments and FIXMEs from structs code
@bors
Copy link
Collaborator

bors commented Jan 5, 2026

⌛ Testing commit 05afcb6 with merge 4c5f257...

@jieyouxu
Copy link
Member

jieyouxu commented Jan 5, 2026

ah does bors not pick up from approve messages..

Yes

@jieyouxu
Copy link
Member

jieyouxu commented Jan 5, 2026

@bors retry r- (unexpected auto-retry?)

@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 Jan 5, 2026
@jieyouxu
Copy link
Member

jieyouxu commented Jan 5, 2026

@bors r=BoxyUwU

@bors
Copy link
Collaborator

bors commented Jan 5, 2026

📌 Commit 05afcb6 has been approved by BoxyUwU

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 5, 2026
@bors
Copy link
Collaborator

bors commented Jan 5, 2026

⌛ Testing commit 05afcb6 with merge 6885bdf...

@bors
Copy link
Collaborator

bors commented Jan 5, 2026

☀️ Test successful - checks-actions
Approved by: BoxyUwU
Pushing 6885bdf to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 5, 2026
@bors bors merged commit 6885bdf into rust-lang:main Jan 5, 2026
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 451b7b6 (parent) -> 6885bdf (this PR)

Test differences

Show 41 test diffs

Stage 1

  • [crashes] tests/crashes/136379.rs: pass -> [missing] (J0)
  • [crashes] tests/crashes/138132.rs: pass -> [missing] (J0)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_arg_simple.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_complex_args.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_erroneous.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_in_array_len.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_nested.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_type_relative.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/type_as_const_in_array_len.rs: [missing] -> pass (J0)

Stage 2

  • [crashes] tests/crashes/136379.rs: pass -> [missing] (J1)
  • [crashes] tests/crashes/138132.rs: pass -> [missing] (J1)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_arg_simple.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_complex_args.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_erroneous.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_in_array_len.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_nested.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/tuple_ctor_type_relative.rs: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/type_as_const_in_array_len.rs: [missing] -> pass (J2)

Additionally, 23 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 6885bdf1af7e0435b80bf79a780c3fe7a495094f --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 3524.2s -> 4706.5s (+33.6%)
  2. dist-x86_64-apple: 6525.8s -> 7541.9s (+15.6%)
  3. pr-check-1: 1936.2s -> 1640.7s (-15.3%)
  4. dist-aarch64-apple: 7091.8s -> 6082.5s (-14.2%)
  5. x86_64-gnu-miri: 4948.6s -> 4265.9s (-13.8%)
  6. x86_64-rust-for-linux: 3191.3s -> 2758.1s (-13.6%)
  7. dist-aarch64-llvm-mingw: 6318.4s -> 5481.6s (-13.2%)
  8. aarch64-apple: 9538.3s -> 10730.9s (+12.5%)
  9. x86_64-gnu-aux: 7788.3s -> 6824.0s (-12.4%)
  10. i686-gnu-1: 8392.3s -> 7406.0s (-11.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6885bdf): comparison URL.

Overall result: ❌ regressions - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.2%] 11
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 3.5%, secondary 1.9%)

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

mean range count
Regressions ❌
(primary)
9.4% [9.4%, 9.4%] 1
Regressions ❌
(secondary)
1.9% [1.9%, 1.9%] 1
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.5% [-2.3%, 9.4%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

Results (primary 0.0%, secondary 0.0%)

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.1%] 22
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 20
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.1%] 22

Bootstrap: 477.322s -> 473.743s (-0.75%)
Artifact size: 390.73 MiB -> 390.82 MiB (0.02%)

@rustbot rustbot added the perf-regression Performance regression. label Jan 5, 2026
@Kobzol
Copy link
Member

Kobzol commented Jan 6, 2026

The regressions are only on a few secondary stress tests and they are tiny, I don't think it's worth digging further.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MGCA: support tuple constructor calls as a direct const argument ICE: invalid Res Def .. for const path ICE: invalid Res for const path

8 participants