Skip to content
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

Remove unsizing coercions for tuples #137728

Merged
merged 3 commits into from
Mar 5, 2025
Merged

Conversation

Darksonn
Copy link
Contributor

See #42877 (comment) and below comments for justification.

Tracking issue: #42877
Fixes: #135217

@rustbot
Copy link
Collaborator

rustbot commented Feb 27, 2025

r? @Nadrieril

rustbot has assigned @Nadrieril.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Feb 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 27, 2025

The Miri subtree was changed

cc @rust-lang/miri

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@RalfJung
Copy link
Member

Does this mean we can't ever have unstable unsizing coercions again? That seems problematic?

@Darksonn
Copy link
Contributor Author

I replied to that on the tracking issue.

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

Let's crater this just to see if anything interesting in the ecosystem is using this. Nightly feature gates are definitely free to be removed regardless, but it would be a good data point.

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2025
Remove unsizing coercions for tuples

See rust-lang#42877 (comment) and below comments for justification.

Tracking issue: rust-lang#42877
Fixes: rust-lang#135217
@bors
Copy link
Contributor

bors commented Feb 27, 2025

⌛ Trying commit 8cab0ba with merge 802c9b5...

@bors
Copy link
Contributor

bors commented Feb 27, 2025

☀️ Try build successful - checks-actions
Build commit: 802c9b5 (802c9b5f98c16ec9d24cdfd517f740f1f3df0e29)

@oli-obk
Copy link
Contributor

oli-obk commented Feb 27, 2025

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-137728 created and queued.
🤖 Automatically detected try build 802c9b5
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 27, 2025
@craterbot
Copy link
Collaborator

🚧 Experiment pr-137728 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-137728 is completed!
📊 16 regressed and 4 fixed (589656 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Mar 1, 2025
@oli-obk
Copy link
Contributor

oli-obk commented Mar 1, 2025

The only real failure is in a game engine that seems to be entirely C++ nowadays: https://github.com/inexorgame/vulkan-renderer

@Darksonn
Copy link
Contributor Author

Darksonn commented Mar 4, 2025

What is the correct way to list an unstable feature as removed?

Right now, I just completely remove the feature, so #![feature(unsized_tuple_coercion)] would fail with an "unknown feature" error without telling the user that it's been removed.

@oli-obk
Copy link
Contributor

oli-obk commented Mar 4, 2025

@Darksonn
Copy link
Contributor Author

Darksonn commented Mar 4, 2025

Done.

@oli-obk
Copy link
Contributor

oli-obk commented Mar 5, 2025

The type system still assumes unsized tuples can exist, but now there is no way to produce them.

@rust-lang/types Should we make the is_sized and Sized handling logic assume tuples are sized, too?

@lcnr
Copy link
Contributor

lcnr commented Mar 5, 2025

@rust-lang/types Should we make the is_sized and Sized handling logic assume tuples are sized, too?

I personally think so, but believe this requires an FCP. I would like to do this in a separate PR. Right now (dyn X,) is a well-formed type and fn foo<T: ?Sized>(x: &(T,)) {} compiles

@oli-obk
Copy link
Contributor

oli-obk commented Mar 5, 2025

r? @oli-obk

@bors r+

@bors
Copy link
Contributor

bors commented Mar 5, 2025

📌 Commit 68df70d has been approved by oli-obk

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 Mar 5, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 5, 2025
Rollup of 20 pull requests

Successful merges:

 - rust-lang#134063 (dec2flt: Clean up float parsing modules)
 - rust-lang#136581 (Retire the legacy `Makefile`-based `run-make` test infra)
 - rust-lang#136662 (Count char width at most once in `Formatter::pad`)
 - rust-lang#136764 (Make `ptr_cast_add_auto_to_object` lint into hard error)
 - rust-lang#136798 (Added documentation for flushing per rust-lang#74348)
 - rust-lang#136865 (Perform deeper compiletest path normalization for `$TEST_BUILD_DIR` to account for compare-mode/debugger cases, and normalize long type file filename hashes)
 - rust-lang#136975 (Look for `python3` first on MacOS, not `py`)
 - rust-lang#136977 (Upload Datadog metrics with citool)
 - rust-lang#137240 (Slightly reformat `std::fs::remove_dir_all` error docs)
 - rust-lang#137298 (Check signature WF when lowering MIR body)
 - rust-lang#137463 ([illumos] attempt to use posix_spawn to spawn processes)
 - rust-lang#137477 (uefi: Add Service Binding Protocol abstraction)
 - rust-lang#137569 (Stabilize `string_extend_from_within`)
 - rust-lang#137633 (Only use implied bounds hack if bevy, and use deeply normalize in implied bounds hack)
 - rust-lang#137679 (Various coretests improvements)
 - rust-lang#137723 (Make `rust.description` more general-purpose and pass `CFG_VER_DESCRIPTION`)
 - rust-lang#137728 (Remove unsizing coercions for tuples)
 - rust-lang#137731 (Resume one waiter at once in deadlock handler)
 - rust-lang#137875 (mir_build: Integrate "simplification" steps into match-pair-tree creation)
 - rust-lang#138028 (compiler: add `ExternAbi::is_rustic_abi`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 257b494 into rust-lang:master Mar 5, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 5, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 5, 2025
Rollup merge of rust-lang#137728 - Darksonn:no-tuple-unsize, r=oli-obk

Remove unsizing coercions for tuples

See rust-lang#42877 (comment) and below comments for justification.

Tracking issue: rust-lang#42877
Fixes: rust-lang#135217
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 6, 2025
Make tuples implicitly sized

Since  rust-lang#137728 there is no sound way to create unsized tuples anymore.

Let's see if we can get away with making tuples unsized at least as far as crater is concerned. With that information we can then discuss whether to actually do this or what path forward we have.

r? `@ghost`
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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CoercePointee leaks unstable unsizing impls
10 participants