Skip to content

Exact length collection attempt 2#149598

Open
jdonszelmann wants to merge 2 commits intorust-lang:mainfrom
jdonszelmann:exact-length-collection
Open

Exact length collection attempt 2#149598
jdonszelmann wants to merge 2 commits intorust-lang:mainfrom
jdonszelmann:exact-length-collection

Conversation

@jdonszelmann
Copy link
Contributor

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Dec 3, 2025
@Mark-Simulacrum Mark-Simulacrum removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 4, 2025
@tmvkrpxl0
Copy link

How does this have 0 lines change?

@jdonszelmann
Copy link
Contributor Author

It includes both the revert commit and re-addition. If I rebase on main it'll contain the right diff

@jdonszelmann jdonszelmann force-pushed the exact-length-collection branch from 16610b1 to 89889d0 Compare March 2, 2026 10:32
@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2026

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added T-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Mar 2, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
##[group]Runner Image Provisioner
Hosted Compute Agent
Version: 20260213.493
Commit: 5c115507f6dd24b8de37d8bbe0bb4509d0cc0fa3
Build Date: 2026-02-13T00:28:41Z
Worker ID: {5dd4891d-4b4a-492f-844f-75741f4a5615}
Azure Region: westcentralus
##[endgroup]
##[group]Operating System
Ubuntu
24.04.3
LTS
---
/dev/sda15      105M  6.2M   99M   6% /boot/efi
tmpfs           1.6G   12K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (94915344KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
warning: profiler_builtins@0.0.0: /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/compiler-rt/lib/profile/InstrProfilingFile.c:476:9: note: in expansion of macro ‘COMPILER_RT_FTRUNCATE’
warning: profiler_builtins@0.0.0:   476 |   (void)COMPILER_RT_FTRUNCATE(ProfileFile,
warning: profiler_builtins@0.0.0:       |         ^~~~~~~~~~~~~~~~~~~~~
[RUSTC-TIMING] profiler_builtins test:false 0.029
error[E0277]: the trait bound `{closure@iterator.rs:4155:39}: [const] FnOnce([...; 1])` is not satisfied
    --> library/core/src/iter/traits/iterator.rs:4155:39
     |
4155 |         self.collect_array::<1>().map(|[i]| i)
     |                                   --- ^^^^^^^
     |                                   |
     |                                   required by a bound introduced by this call
     |
note: required by a bound in `Option::<T>::map`
    --> library/core/src/option.rs:1162:12
     |
1160 |     pub const fn map<U, F>(self, f: F) -> Option<U>
     |                  --- required by a bound in this associated function
1161 |     where
1162 |         F: [const] FnOnce(T) -> U + [const] Destruct,
     |            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
     = note: the full name for the type has been written to '/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/dist/deps/core-59a13b11ab196e5f.long-type-15570159052211805582.txt'
     = note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `{closure@library/core/src/iter/traits/iterator.rs:4155:39: 4155:44}: [const] marker::Destruct` is not satisfied
    --> library/core/src/iter/traits/iterator.rs:4155:39
     |
4155 |         self.collect_array::<1>().map(|[i]| i)
     |                                   --- ^^^^^^^
     |                                   |
     |                                   required by a bound introduced by this call
     |
note: required by a bound in `Option::<T>::map`
    --> library/core/src/option.rs:1162:37
     |
1160 |     pub const fn map<U, F>(self, f: F) -> Option<U>
     |                  --- required by a bound in this associated function
1161 |     where
1162 |         F: [const] FnOnce(T) -> U + [const] Destruct,
     |                                     ^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`

error[E0277]: the trait bound `array::iter::IntoIter<<Self as iterator::Iterator>::Item, _>: [const] marker::Destruct` is not satisfied
    --> library/core/src/iter/traits/iterator.rs:4184:27
     |
4184 |         self.next_chunk().ok().filter(|_| self.next().is_none())
     |                           ^^
     |
note: required by a bound in `result::Result::<T, E>::ok`
    --> library/core/src/result.rs:711:12
     |
 708 |     pub const fn ok(self) -> Option<T>
     |                  -- required by a bound in this associated function
...
 711 |         E: [const] Destruct,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `Result::<T, E>::ok`

error[E0277]: the trait bound `<Self as iterator::Iterator>::Item: [const] marker::Destruct` is not satisfied
    --> library/core/src/iter/traits/iterator.rs:4184:27
     |
4184 |         self.next_chunk().ok().filter(|_| self.next().is_none())
     |                           ^^
     |
note: required by a bound in `result::Result::<T, E>::ok`
    --> library/core/src/result.rs:710:12
     |
 708 |     pub const fn ok(self) -> Option<T>
     |                  -- required by a bound in this associated function
 709 |     where
 710 |         T: [const] Destruct,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `Result::<T, E>::ok`

error[E0277]: the trait bound `<Self as iterator::Iterator>::Item: [const] marker::Destruct` is not satisfied
    --> library/core/src/iter/traits/iterator.rs:4184:32
     |
4184 |         self.next_chunk().ok().filter(|_| self.next().is_none())
     |                                ^^^^^^
     |
note: required by a bound in `Option::<T>::filter`
    --> library/core/src/option.rs:1581:12
     |
1578 |     pub const fn filter<P>(self, predicate: P) -> Self
     |                  ------ required by a bound in this associated function
...
1581 |         T: [const] Destruct,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::filter`

error[E0277]: the trait bound `{closure@library/core/src/iter/traits/iterator.rs:4184:39: 4184:42}: [const] marker::Destruct` is not satisfied
    --> library/core/src/iter/traits/iterator.rs:4184:39
     |
4184 |         self.next_chunk().ok().filter(|_| self.next().is_none())
     |                                ------ ^^^^^^^^^^^^^^^^^^^^^^^^^
     |                                |
     |                                required by a bound introduced by this call
     |
note: required by a bound in `Option::<T>::filter`
    --> library/core/src/option.rs:1580:41
     |
1578 |     pub const fn filter<P>(self, predicate: P) -> Self
     |                  ------ required by a bound in this associated function
1579 |     where
1580 |         P: [const] FnOnce(&T) -> bool + [const] Destruct,
     |                                         ^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::filter`

error[E0277]: the trait bound `{closure@iterator.rs:4184:39}: [const] FnOnce(&[...; _])` is not satisfied
    --> library/core/src/iter/traits/iterator.rs:4184:39
     |
4184 |         self.next_chunk().ok().filter(|_| self.next().is_none())
     |                                ------ ^^^^^^^^^^^^^^^^^^^^^^^^^
     |                                |
     |                                required by a bound introduced by this call
     |
note: required by a bound in `Option::<T>::filter`
    --> library/core/src/option.rs:1580:12
     |
1578 |     pub const fn filter<P>(self, predicate: P) -> Self
     |                  ------ required by a bound in this associated function
1579 |     where
1580 |         P: [const] FnOnce(&T) -> bool + [const] Destruct,
     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::filter`
     = note: the full name for the type has been written to '/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/dist/deps/core-59a13b11ab196e5f.long-type-6733336337313999738.txt'
     = note: consider using `--verbose` to print the full type name to the console

For more information about this error, try `rustc --explain E0277`.
[RUSTC-TIMING] core test:false 15.497
error: could not compile `core` (lib) due to 7 previous errors

For more information how to resolve CI failures of this job, visit this link.

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 23, 2026

☔ The latest upstream changes (presumably #154255) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants