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

Make tuples implicitly sized #138093

Closed
wants to merge 1 commit into from
Closed

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 6, 2025

Since #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

@oli-obk oli-obk added the T-types Relevant to the types team, which will review and decide on the PR/issue. label Mar 6, 2025
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Mar 6, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 6, 2025

@bors try

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`
@bors
Copy link
Contributor

bors commented Mar 6, 2025

⌛ Trying commit c42f697 with merge 5482d17...

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 6, 2025

@rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

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

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 6, 2025
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added A-tidy Area: The tidy tool T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 6, 2025
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling derive_setters v0.1.6
error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/zerovec-0.10.4/src/varzerovec/slice.rs:102:25
    |
101 | pub struct VarZeroSlice<T: ?Sized, F = Index16> {
    |                         - this type parameter needs to be `Sized`
102 |     marker: PhantomData<(F, T)>,
    |
help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
    |
101 - pub struct VarZeroSlice<T: ?Sized, F = Index16> {
101 + pub struct VarZeroSlice<T, F = Index16> {

   Compiling ctrlc v3.4.5
   Compiling ppv-lite86 v0.2.20
   Compiling hashbrown v0.14.5

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
file:.git/config submodule.library/backtrace.active=true
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
---
   Compiling derive-where v1.2.7
error[E0277]: the size for values of type `T` cannot be known at compilation time
   --> /rust/deps/zerovec-0.10.4/src/varzerovec/slice.rs:102:25
    |
101 | pub struct VarZeroSlice<T: ?Sized, F = Index16> {
    |                         - this type parameter needs to be `Sized`
102 |     marker: PhantomData<(F, T)>,
    |
help: consider removing the `?Sized` bound to make the type parameter `Sized`
    |
    |
101 - pub struct VarZeroSlice<T: ?Sized, F = Index16> {
101 + pub struct VarZeroSlice<T, F = Index16> {

[RUSTC-TIMING] rustc_index_macros test:false 0.626
   Compiling thiserror-impl v1.0.69
[RUSTC-TIMING] unic_langid_macros_impl test:false 0.553
---
Caused by:
    Command RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --rust-profile-generate /tmp/tmp-multistage/opt-artifacts/rustc-pgo --set llvm.thin-lto=false --set llvm.link-shared=true [at /checkout/obj] has failed with exit code Some(1)

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc::string::String>
             at /rust/deps/anyhow-1.0.95/src/backtrace.rs:27:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/exec.rs:80:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/exec.rs:181:9
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/main.rs:222:13
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/main.rs:222:13
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/main.rs:211:9
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/main.rs:211:9
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, opt_dist::training::RustcPGOProfile>
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/main.rs:208:29
   8: opt_dist::main
             at /rustc/5482d17c79ef6fdb109cee082f8c7b67486cf798/src/tools/opt-dist/src/main.rs:400:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/core/src/ops/function.rs:250:5
  10: std::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/sys/backtrace.rs:152:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/rt.rs:199:18
  12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
  13: std::panicking::try::do_call
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/panicking.rs:587:40
  14: std::panicking::try
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/panicking.rs:550:19

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 6, 2025

Nevermind, this doesn't even bootstrap. PhantomData<(F, T)> where T: ?Sized 😞 Could just be two phantom datas, so we do have a path forward, but it will take years to migrate everyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tidy Area: The tidy tool S-waiting-on-perf Status: Waiting on a perf run to be completed. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-types Relevant to the types 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.

5 participants