Skip to content

Conversation

@speedy-lex
Copy link
Contributor

This is a test to check how much this would break crates. https://discord.com/channels/273534239310479360/957720175619215380/1416580604534980679

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 14, 2025
@speedy-lex
Copy link
Contributor Author

cc @workingjubilee

@rust-log-analyzer

This comment has been minimized.

@Zalathar
Copy link
Member

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 14, 2025
test: make [T; N]::default use const generics
@fmease fmease changed the title test: make [T; N]::default use const generics test: make <[T; N]>::default use const generics Sep 14, 2025
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rand test:false 1.005
[RUSTC-TIMING] allocbenches test:true 8.687
[RUSTC-TIMING] corebenches test:true 9.760
[RUSTC-TIMING] vec_deque_alloc_error test:true 0.282
error[E0599]: the function or associated item `default` exists for array `[DoesNotImplDefault; 0]`, but its trait bounds were not satisfied
##[error]   --> coretests/tests/array.rs:299:43
    |
297 |     struct DoesNotImplDefault;
    |     ------------------------- doesn't satisfy `DoesNotImplDefault: Default`
298 |
299 |     let _arr = <[DoesNotImplDefault; 0]>::default();
    |                                           ^^^^^^^ function or associated item cannot be called on `[DoesNotImplDefault; 0]` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DoesNotImplDefault: Default`
            which is required by `[DoesNotImplDefault; 0]: Default`
help: consider annotating `DoesNotImplDefault` with `#[derive(Default)]`
    |
297 +     #[derive(Default)]
298 |     struct DoesNotImplDefault;
    |

[RUSTC-TIMING] alloctests test:true 14.903
[RUSTC-TIMING] alloctests test:true 13.941
For more information about this error, try `rustc --explain E0599`.
[RUSTC-TIMING] coretests test:true 57.300
error: could not compile `coretests` (test "coretests") due to 1 previous error
env -u RUSTC_WRAPPER CARGO_ENCODED_RUSTDOCFLAGS="-Csymbol-mangling-version=v0\u{1f}-Zrandomize-layout\u{1f}-Zunstable-options\u{1f}--check-cfg=cfg(bootstrap)\u{1f}--check-cfg=cfg(llvm_enzyme)\u{1f}-Dwarnings\u{1f}-Wrustdoc::invalid_codeblock_attributes\u{1f}--crate-version\u{1f}1.91.0-nightly\t(8f753a872\t2025-09-13)" CARGO_ENCODED_RUSTFLAGS="-Csymbol-mangling-version=v0\u{1f}-Zrandomize-layout\u{1f}-Zunstable-options\u{1f}--check-cfg=cfg(bootstrap)\u{1f}--check-cfg=cfg(llvm_enzyme)\u{1f}-Zmacro-backtrace\u{1f}-Csplit-debuginfo=off\u{1f}-Clink-arg=-L/usr/lib/llvm-19/lib\u{1f}-Cllvm-args=-import-instr-limit=10\u{1f}-Clink-args=-Wl,-z,origin\u{1f}-Clink-args=-Wl,-rpath,$ORIGIN/../lib\u{1f}-Alinker-messages\u{1f}--cap-lints=allow\u{1f}--cfg\u{1f}randomized_layouts" RUSTC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif/dist/rustc-clif" RUSTDOC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif/dist/rustdoc-clif" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/bin/cargo" "test" "--manifest-path" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif/build/sysroot_tests/Cargo.toml" "--target-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif/build/sysroot_tests_target" "--locked" "--target" "aarch64-unknown-linux-gnu" "-p" "coretests" "-p" "alloctests" "--tests" "--" "-q" exited with status ExitStatus(unix_wait_status(25856))
Command `/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/bin/cargo run --target aarch64-unknown-linux-gnu -Zbinary-dep-depinfo -j 4 -Zroot-dir=/checkout --locked --color always --release --manifest-path /checkout/compiler/rustc_codegen_cranelift/build_system/Cargo.toml -- test --download-dir /checkout/obj/build/cg_clif_download --out-dir /checkout/obj/build/aarch64-unknown-linux-gnu/stage2-codegen/cg_clif --no-unstable-features --use-backend cranelift --sysroot llvm --skip-test testsuite.extended_sysroot [workdir=/checkout/compiler/rustc_codegen_cranelift]` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/test.rs:3662:25
Executed at: src/bootstrap/src/core/build_steps/test.rs:3707:26

Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Build completed unsuccessfully in 0:20:51
  local time: Sun Sep 14 01:35:58 UTC 2025
  network time: Sun, 14 Sep 2025 01:35:59 GMT
##[error]Process completed with exit code 1.

@theemathas
Copy link
Contributor

See #61415 for previous discussion

@Zalathar
Copy link
Member

See also #145457.

@SciMind2460
Copy link
Contributor

Perhaps it's a good idea to remove this test for the PR?

@rust-bors
Copy link

rust-bors bot commented Sep 14, 2025

☀️ Try build successful (CI)
Build commit: 17457aa (17457aab7004344a08bc08cfd53aa70cf02a73ef, parent: 02c7b1a7ac1d739663878030510508372e46f254)

@SciMind2460
Copy link
Contributor

Ok...

I don't know if I have permissions for this but I'll try...

@craterbot check

@craterbot
Copy link
Collaborator

🔒 Error: you're not allowed to interact with this bot.

🔑 If you are a member of a Rust team and need access, please update rust-lang/team to grant your team or yourself access to the crater permission.
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@Noratrieb
Copy link
Member

This is effecticely a duplicate of #145457 (comment), so there's no point in running crater again

@speedy-lex
Copy link
Contributor Author

This is a duplicate we already have results here https://crater-reports.s3.amazonaws.com/pr-145457/index.html

@speedy-lex speedy-lex closed this Sep 14, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 14, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 15, 2025
…-errors

Note some previous attempts to change the Default impl for `[T; 0]`

Recently, rust-lang#145457 experimented with changing the Default impl for `[T; 0]`.

Subsequently, rust-lang#146531 also aimed to perform a similar experiment.

It seems like a good idea to add some links to the relevant source code, so that the historical context of this tricky topic is easier to find.
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 15, 2025
…-errors

Note some previous attempts to change the Default impl for `[T; 0]`

Recently, rust-lang#145457 experimented with changing the Default impl for `[T; 0]`.

Subsequently, rust-lang#146531 also aimed to perform a similar experiment.

It seems like a good idea to add some links to the relevant source code, so that the historical context of this tricky topic is easier to find.
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 15, 2025
…-errors

Note some previous attempts to change the Default impl for `[T; 0]`

Recently, rust-lang#145457 experimented with changing the Default impl for `[T; 0]`.

Subsequently, rust-lang#146531 also aimed to perform a similar experiment.

It seems like a good idea to add some links to the relevant source code, so that the historical context of this tricky topic is easier to find.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 15, 2025
…-errors

Note some previous attempts to change the Default impl for `[T; 0]`

Recently, rust-lang#145457 experimented with changing the Default impl for `[T; 0]`.

Subsequently, rust-lang#146531 also aimed to perform a similar experiment.

It seems like a good idea to add some links to the relevant source code, so that the historical context of this tricky topic is easier to find.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 15, 2025
…-errors

Note some previous attempts to change the Default impl for `[T; 0]`

Recently, rust-lang#145457 experimented with changing the Default impl for `[T; 0]`.

Subsequently, rust-lang#146531 also aimed to perform a similar experiment.

It seems like a good idea to add some links to the relevant source code, so that the historical context of this tricky topic is easier to find.
rust-timer added a commit that referenced this pull request Sep 16, 2025
Rollup merge of #146533 - Zalathar:array-default, r=compiler-errors

Note some previous attempts to change the Default impl for `[T; 0]`

Recently, #145457 experimented with changing the Default impl for `[T; 0]`.

Subsequently, #146531 also aimed to perform a similar experiment.

It seems like a good idea to add some links to the relevant source code, so that the historical context of this tricky topic is easier to find.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Oct 9, 2025
…-errors

Note some previous attempts to change the Default impl for `[T; 0]`

Recently, rust-lang#145457 experimented with changing the Default impl for `[T; 0]`.

Subsequently, rust-lang#146531 also aimed to perform a similar experiment.

It seems like a good idea to add some links to the relevant source code, so that the historical context of this tricky topic is easier to find.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants