Skip to content

Consistent trait bounds for ExtractIf Debug impls #139764

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Apr 13, 2025

Closes #137654. Refer to that issue for a table of the 4 different impl signatures we previously had in the standard library for Debug impls of various ExtractIf iterator types.

The one we are standardizing on is the one so far only used by alloc::collections::linked_list::ExtractIf, which is no F: Debug bound, no F: FnMut bound, only T: Debug bound.

This PR applies the following signature changes:

/* alloc::collections::btree_map */

    pub struct ExtractIf<'a, K, V, F, A = Global>
    where
-       F: 'a + FnMut(&K, &mut V) -> bool,
        Allocator + Clone,

    impl Debug for ExtractIf<'a, K, V, F,
+       A,
    >
    where
        K: Debug,
        V: Debug,
-       F: FnMut(&K, &mut V) -> bool,
+       A: Allocator + Clone,
/* alloc::collections::btree_set */

    pub struct ExtractIf<'a, T, F, A = Global>
    where
-       T: 'a,
-       F: 'a + FnMut(&T) -> bool,
        Allocator + Clone,

    impl Debug for ExtractIf<'a, T, F, A>
    where
        T: Debug,
-       F: FnMut(&T) -> bool,
        A: Allocator + Clone,
/* alloc::collections::linked_list */

    impl Debug for ExtractIf<'a, T, F,
+       A,
    >
    where
        T: Debug,
+       A: Allocator,
/* alloc::vec */

    impl Debug for ExtractIf<'a, T, F, A>
    where
        T: Debug,
-       F: Debug,
        A: Allocator,
-       A: Debug,
/* std::collections::hash_map */

    pub struct ExtractIf<'a, K, V, F>
    where
-       F: FnMut(&K, &mut V) -> bool,

    impl Debug for ExtractIf<'a, K, V, F>
    where
+       K: Debug,
+       V: Debug,
-       F: FnMut(&K, &mut V) -> bool,
/* std::collections::hash_set */

    pub struct ExtractIf<'a, T, F>
    where
-       F: FnMut(&T) -> bool,

    impl Debug for ExtractIf<'a, T, F>
    where
+       T: Debug,
-       F: FnMut(&T) -> bool,

I have made the following changes to bring these types into better alignment with one another.

  • Delete F: Debug bounds. These are especially problematic because Rust closures do not come with a Debug impl, rendering the impl useless.

  • Delete A: Debug bounds. Allocator parameters are unstable for now, but in the future this would become an API commitment that we do not debug-print a representation of the allocator when printing an iterator.

  • Delete F: FnMut bounds. Requires hashbrown PR: Drop FnMut trait bounds from ExtractIf data structures hashbrown#616. API commitment: we commit to not doing RefCell voodoo inside ExtractIf to have some way for its Debug impl (which takes &self) to call a FnMut closure, if this is even possible.

  • Add T: Debug bounds (or K/V), even on Debug impls that do not currently make use of them, but might in the future. Breaking change. Must backport into Rust 1.87 (current beta) or do a de-stabilization PR in beta to delay those types by one release.

  • Render using debug_struct + finish_non_exhaustive, instead of debug_tuple.

  • Do not render the entire underlying collection.

  • Show a "peek" field indicating the current position of the iterator.

@rustbot
Copy link
Collaborator

rustbot commented Apr 13, 2025

r? @thomcc

rustbot has assigned @thomcc.
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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 13, 2025

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@dtolnay dtolnay marked this pull request as draft April 13, 2025 20:25
@dtolnay
Copy link
Member Author

dtolnay commented Apr 13, 2025

Marking as draft until rust-lang/hashbrown#616 ends up in a hashbrown release, but this is ready for review.

@dtolnay dtolnay assigned Amanieu and unassigned thomcc Apr 13, 2025
@rust-log-analyzer

This comment has been minimized.

@dtolnay dtolnay added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 13, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 28, 2025
[beta] Delay `hash_extract_if` stabilization from 1.87 to 1.88

This PR is a revert of:

- rust-lang#134655

for use in the event that we are unable to get rust-lang#139764 into 1.87 (current beta).
@Amanieu
Copy link
Member

Amanieu commented May 1, 2025

hashbrown update may have an impact on perf.

@bors rollup=never

r=me once tests pass

@dtolnay
Copy link
Member Author

dtolnay commented May 1, 2025

@bors rollup

The hashbrown bump is being done separately in #140535.

VlaDexa added a commit to VlaDexa/rust that referenced this pull request May 2, 2025
Update hashbrown dependency to unblock ExtractIf improvements

Release notes: https://github.com/rust-lang/hashbrown/releases/tag/v0.15.3

Relevant to me, this release includes rust-lang/hashbrown#616 which unblocks rust-lang#139764.
bors added a commit to rust-lang-ci/rust that referenced this pull request May 3, 2025
Update hashbrown dependency to unblock ExtractIf improvements

Release notes: https://github.com/rust-lang/hashbrown/releases/tag/v0.15.3

Relevant to me, this release includes rust-lang/hashbrown#616 which unblocks rust-lang#139764.
github-actions bot pushed a commit to LegNeato/miri that referenced this pull request May 4, 2025
Update hashbrown dependency to unblock ExtractIf improvements

Release notes: https://github.com/rust-lang/hashbrown/releases/tag/v0.15.3

Relevant to me, this release includes rust-lang/hashbrown#616 which unblocks rust-lang/rust#139764.
@dtolnay dtolnay marked this pull request as ready for review May 4, 2025 07:04
@rust-log-analyzer

This comment has been minimized.

@dtolnay dtolnay force-pushed the extractif branch 2 times, most recently from 4543ce5 to 8ddda56 Compare May 4, 2025 07:25
@rust-log-analyzer

This comment has been minimized.

@dtolnay
Copy link
Member Author

dtolnay commented May 4, 2025

@rust-lang/libs-api:
@rfcbot fcp merge

This PR alters 2 recent stabilizations, the extract_if feature from #43244 (comment) covering Vec::extract_if and LinkedList::extract_if, and the hash_extract_if feature from #59618 (comment) covering HashMap::extract_if and HashSet::extract_if.

Both stabilization PRs landed in nightly for 1.87.0: #137109 and #134655. The second one (hash_extract_if) has been reverted by #139765 and is no longer going to be releasing in 1.87.0 later this month. extract_if is still on track for 1.87.0.

This PR makes breaking changes to HashMap::extract_if and HashSet::extract_if (hence the un-stabilization) and non-breaking changes to the very-soon-stable Vec::extract_if, LinkedList::extract_if, and non-breaking changes to unstable BTreeMap::extract_if and BTreeSet::extract_if.

Refer to a summary of the API changes in #139764 (comment) that is more readable than the content of the PR.

If someone would prefer, we have time to revert #137109 in beta, either out of an abundance of caution or so that extract_if and hash_extract_if ship together in the same Rust version. Personally I don't think this is necessary.

@rfcbot
Copy link
Collaborator

rfcbot commented May 4, 2025

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label May 4, 2025
@rfcbot rfcbot added disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels May 4, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented May 4, 2025

🔔 This is now entering its final comment period, as per the review above. 🔔

github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request May 5, 2025
Update hashbrown dependency to unblock ExtractIf improvements

Release notes: https://github.com/rust-lang/hashbrown/releases/tag/v0.15.3

Relevant to me, this release includes rust-lang/hashbrown#616 which unblocks rust-lang/rust#139764.
@dtolnay
Copy link
Member Author

dtolnay commented May 5, 2025

Beta for 1.88.0 branches from master on May 9, so if this PR does not merge within 4 days, it is going to need a beta backport at least for the stable attributes (to reflect #139765).

With that in mind, I am short-circuiting the final comment period. This proposed change has already been discussed across at least 3 standard library API meetings and in #137654. Please still provide blocking feedback if you have it, and we can deal with that in beta.

@bors r=Amanieu

@bors
Copy link
Collaborator

bors commented May 5, 2025

📌 Commit 08ce912 has been approved by Amanieu

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 May 5, 2025
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request May 5, 2025
Update hashbrown dependency to unblock ExtractIf improvements

Release notes: https://github.com/rust-lang/hashbrown/releases/tag/v0.15.3

Relevant to me, this release includes rust-lang/hashbrown#616 which unblocks rust-lang/rust#139764.
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
#19 exporting to docker image format
#19 sending tarball 20.2s done
#19 DONE 25.4s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-19]
[CI_JOB_NAME=x86_64-gnu-llvm-19]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-19', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--set', 'gcc.download-ci-gcc=true', '--enable-new-symbol-mangling']
configure: build.build          := x86_64-unknown-linux-gnu
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-19/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
[RUSTC-TIMING] proc_macro test:false 5.420
[RUSTC-TIMING] test test:false 8.927
    Finished `release` profile [optimized] target(s) in 1m 17s
##[endgroup]
[TIMING] core::build_steps::compile::Std { target: x86_64-unknown-linux-gnu, compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu, forced_compiler: true }, crates: [], force_recompile: false, extra_rust_args: ["-Csymbol-mangling-version=v0", "-Cpanic=abort"], is_for_mir_opt_tests: false } -- 77.117
Testing GCC stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
 Downloading crates ...
  Downloaded boml v0.3.1
   Compiling boml v0.3.1
[RUSTC-TIMING] boml test:false 0.764
   Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
[RUSTC-TIMING] y test:false 2.880
    Finished `release` profile [optimized] target(s) in 4.01s
     Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-backend gcc --gcc-path /checkout/obj/build/x86_64-unknown-linux-gnu/ci-gcc/lib --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --mini-tests --std-tests`
`--gcc-path` was provided, ignoring config file. Using `/checkout/obj/build/x86_64-unknown-linux-gnu/ci-gcc/lib` as path for libgccjit
[BUILD] mini_core
[RUSTC-TIMING] mini_core test:false 0.203
[BUILD] example
[AOT] mini_core_hello_world
[RUSTC-TIMING] mini_core_hello_world test:false 0.180
---
Testing parser-tuple.js ... OK
Testing parser-weird-queries.js ... OK
Testing path-end-empty.js ... OK
Testing path-maxeditdistance.js ... FAILED
[ query `vec::iter`]==> Exact check failed at position 3: expected '{"path":"std::vec::Drain","name":"into_iter"}' but found '{"parent":{"ty":5,"name":"ExtractIf","path":"std::vec","exactPath":"alloc::vec::extract_if","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"dist":2,"path_dist":0,"index":4,"desc":"","item":{"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9129,"len":1572,"promise":{}},"descIndex":1535,"exactPath":"alloc::vec::extract_if","parent":{"ty":5,"name":"ExtractIf","path":"std::vec","exactPath":"alloc::vec::extract_if","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"paramNames":["I"],"id":72843,"word":"into_iter","normalizedName":"intoiter","bitIndex":25441,"implDisambiguator":null},"displayPath":"<span>std::</span><span>vec::</span><span>ExtractIf::</span>","fullPath":"alloc::vec::extract_if::ExtractIf::into_iter|13","href":"../std/vec/struct.ExtractIf.html#method.into_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9129,"len":1572,"promise":{}},"descIndex":1535,"exactPath":"alloc::vec::extract_if","paramNames":["I"],"id":72843,"word":"into_iter","normalizedName":"intoiter","bitIndex":25441,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 3: expected '{"path":"std::vec::IntoIter","name":"into_iter"}' but found '{"parent":{"ty":5,"name":"Drain","path":"std::vec","exactPath":"alloc::vec::drain","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"dist":2,"path_dist":0,"index":4,"desc":"","item":{"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9129,"len":1572,"promise":{}},"descIndex":1535,"exactPath":"alloc::vec::drain","parent":{"ty":5,"name":"Drain","path":"std::vec","exactPath":"alloc::vec::drain","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"paramNames":["I"],"id":72844,"word":"into_iter","normalizedName":"intoiter","bitIndex":25442,"implDisambiguator":null},"displayPath":"<span>std::</span><span>vec::</span><span>Drain::</span>","fullPath":"alloc::vec::drain::Drain::into_iter|13","href":"../std/vec/struct.Drain.html#method.into_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9129,"len":1572,"promise":{}},"descIndex":1535,"exactPath":"alloc::vec::drain","paramNames":["I"],"id":72844,"word":"into_iter","normalizedName":"intoiter","bitIndex":25442,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::vec::Splice","name":"into_iter"}' but found '{"parent":{"ty":5,"name":"Splice","path":"std::vec","exactPath":"alloc::vec::splice","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"dist":2,"path_dist":0,"index":4,"desc":"","item":{"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9129,"len":1572,"promise":{}},"descIndex":1536,"exactPath":"alloc::vec::splice","parent":{"ty":5,"name":"Splice","path":"std::vec","exactPath":"alloc::vec::splice","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"paramNames":["I"],"id":72849,"word":"into_iter","normalizedName":"intoiter","bitIndex":25447,"implDisambiguator":null},"displayPath":"<span>std::</span><span>vec::</span><span>Splice::</span>","fullPath":"alloc::vec::splice::Splice::into_iter|13","href":"../std/vec/struct.Splice.html#method.into_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9129,"len":1572,"promise":{}},"descIndex":1536,"exactPath":"alloc::vec::splice","paramNames":["I"],"id":72849,"word":"into_iter","normalizedName":"intoiter","bitIndex":25447,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::collections::VecDeque","name":"iter"}' but found '{"parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":11,"name":"reference","ty":1,"path":null,"exactPath":null,"generics":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"bindings":{},"unboxFlag":true}],"output":[{"id":67,"name":"Iter","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::iter","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"dist":0,"path_dist":1,"index":0,"desc":"Returns a front-to-back iterator.","item":{"crate":"std","ty":13,"name":"iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1530,"exactPath":"alloc::collections::vec_deque","parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":11,"name":"reference","ty":1,"path":null,"exactPath":null,"generics":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"bindings":{},"unboxFlag":true}],"output":[{"id":67,"name":"Iter","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::iter","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"paramNames":["T","A"],"id":55602,"word":"iter","normalizedName":"iter","bitIndex":8200,"implDisambiguator":null},"displayPath":"<span>std::</span><span>collections::</span><span>VecDeque::</span>","fullPath":"alloc::collections::vec_deque::VecDeque::iter|13","href":"../std/collections/struct.VecDeque.html#method.iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1530,"exactPath":"alloc::collections::vec_deque","paramNames":["T","A"],"id":55602,"word":"iter","normalizedName":"iter","bitIndex":8200,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::collections::VecDeque","name":"iter_mut"}' but found '{"parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":11,"name":"reference","ty":1,"path":null,"exactPath":null,"generics":[{"id":22,"name":"mut","ty":0,"path":"std","exactPath":"std","generics":[],"bindings":{},"unboxFlag":false},{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"bindings":{},"unboxFlag":true}],"output":[{"id":66,"name":"IterMut","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::iter_mut","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"dist":2,"path_dist":1,"index":0,"desc":"Returns a front-to-back iterator that returns mutable …","item":{"crate":"std","ty":13,"name":"iter_mut","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1534,"exactPath":"alloc::collections::vec_deque","parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":11,"name":"reference","ty":1,"path":null,"exactPath":null,"generics":[{"id":22,"name":"mut","ty":0,"path":"std","exactPath":"std","generics":[],"bindings":{},"unboxFlag":false},{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"bindings":{},"unboxFlag":true}],"output":[{"id":66,"name":"IterMut","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::iter_mut","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"paramNames":["T","A"],"id":55606,"word":"iter_mut","normalizedName":"itermut","bitIndex":8204,"implDisambiguator":null},"displayPath":"<span>std::</span><span>collections::</span><span>VecDeque::</span>","fullPath":"alloc::collections::vec_deque::VecDeque::iter_mut|13","href":"../std/collections/struct.VecDeque.html#method.iter_mut","displayTypeSignature":null,"crate":"std","ty":13,"name":"iter_mut","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1534,"exactPath":"alloc::collections::vec_deque","paramNames":["T","A"],"id":55606,"word":"iter_mut","normalizedName":"itermut","bitIndex":8204,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::collections::VecDeque","name":"from_iter"}' but found '{"parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"output":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":50,"name":"IntoIterator","ty":10,"path":"std::iter","exactPath":"core::iter::traits::collect","generics":[],"bindings":{},"unboxFlag":false}]]},"dist":2,"path_dist":1,"index":4,"desc":"","item":{"crate":"std","ty":13,"name":"from_iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1455,"exactPath":"alloc::collections::vec_deque","parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"output":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":50,"name":"IntoIterator","ty":10,"path":"std::iter","exactPath":"core::iter::traits::collect","generics":[],"bindings":{},"unboxFlag":false}]]},"paramNames":["T","I"],"id":55508,"word":"from_iter","normalizedName":"fromiter","bitIndex":8106,"implDisambiguator":null},"displayPath":"<span>std::</span><span>collections::</span><span>VecDeque::</span>","fullPath":"alloc::collections::vec_deque::VecDeque::from_iter|13","href":"../std/collections/struct.VecDeque.html#method.from_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"from_iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1455,"exactPath":"alloc::collections::vec_deque","paramNames":["T","I"],"id":55508,"word":"from_iter","normalizedName":"fromiter","bitIndex":8106,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::collections::VecDeque","name":"into_iter"}' but found '{"parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"output":[{"id":65,"name":"IntoIter","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::into_iter","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"dist":2,"path_dist":1,"index":4,"desc":"Consumes the deque into a front-to-back iterator yielding …","item":{"crate":"std","ty":13,"name":"into_iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1503,"exactPath":"alloc::collections::vec_deque","parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"output":[{"id":65,"name":"IntoIter","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::into_iter","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"paramNames":["T","A"],"id":55573,"word":"into_iter","normalizedName":"intoiter","bitIndex":8171,"implDisambiguator":"impl-IntoIterator-for-VecDeque%3CT,+A%3E"},"displayPath":"<span>std::</span><span>collections::</span><span>VecDeque::</span>","fullPath":"alloc::collections::vec_deque::VecDeque::into_iter|13","href":"../std/collections/struct.VecDeque.html#impl-IntoIterator-for-VecDeque%3CT,+A%3E/method.into_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"into_iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1503,"exactPath":"alloc::collections::vec_deque","paramNames":["T","A"],"id":55573,"word":"into_iter","normalizedName":"intoiter","bitIndex":8171,"implDisambiguator":"impl-IntoIterator-for-VecDeque%3CT,+A%3E"}'
Testing path-ordering.js ... OK
Testing primitive.js ... OK
Testing println-typo.js ... OK
Testing quoted.js ... OK
Testing reference-shrink.js ... OK
---
Testing unbox-type-result.js ... OK
Testing vec-new.js ... OK
Testing vec-type-signatures.js ... OK
Testing write.js ... OK
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:40:21
  local time: Mon May  5 06:14:34 UTC 2025
  network time: Mon, 05 May 2025 06:14:34 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 5, 2025
Consistent trait bounds for ExtractIf Debug impls

Closes rust-lang#137654. Refer to that issue for a table of the **4** different impl signatures we previously had in the standard library for Debug impls of various ExtractIf iterator types.

The one we are standardizing on is the one so far only used by `alloc::collections::linked_list::ExtractIf`, which is _no_ `F: Debug` bound, _no_ `F: FnMut` bound, only `T: Debug` bound.

This PR applies the following signature changes:

```diff
/* alloc::collections::btree_map */

    pub struct ExtractIf<'a, K, V, F, A = Global>
    where
-       F: 'a + FnMut(&K, &mut V) -> bool,
        Allocator + Clone,

    impl Debug for ExtractIf<'a, K, V, F,
+       A,
    >
    where
        K: Debug,
        V: Debug,
-       F: FnMut(&K, &mut V) -> bool,
+       A: Allocator + Clone,
```

```diff
/* alloc::collections::btree_set */

    pub struct ExtractIf<'a, T, F, A = Global>
    where
-       T: 'a,
-       F: 'a + FnMut(&T) -> bool,
        Allocator + Clone,

    impl Debug for ExtractIf<'a, T, F, A>
    where
        T: Debug,
-       F: FnMut(&T) -> bool,
        A: Allocator + Clone,
```

```diff
/* alloc::collections::linked_list */

    impl Debug for ExtractIf<'a, T, F,
+       A,
    >
    where
        T: Debug,
+       A: Allocator,
```

```diff
/* alloc::vec */

    impl Debug for ExtractIf<'a, T, F, A>
    where
        T: Debug,
-       F: Debug,
        A: Allocator,
-       A: Debug,
```

```diff
/* std::collections::hash_map */

    pub struct ExtractIf<'a, K, V, F>
    where
-       F: FnMut(&K, &mut V) -> bool,

    impl Debug for ExtractIf<'a, K, V, F>
    where
+       K: Debug,
+       V: Debug,
-       F: FnMut(&K, &mut V) -> bool,
```

```diff
/* std::collections::hash_set */

    pub struct ExtractIf<'a, T, F>
    where
-       F: FnMut(&T) -> bool,

    impl Debug for ExtractIf<'a, T, F>
    where
+       T: Debug,
-       F: FnMut(&T) -> bool,
```

I have made the following changes to bring these types into better alignment with one another.

- Delete `F: Debug` bounds. These are especially problematic because Rust closures do not come with a Debug impl, rendering the impl useless.

- Delete `A: Debug` bounds. Allocator parameters are unstable for now, but in the future this would become an API commitment that we do not debug-print a representation of the allocator when printing an iterator.

- Delete `F: FnMut` bounds. Requires `hashbrown` PR: rust-lang/hashbrown#616. **API commitment:** we commit to not doing RefCell voodoo inside ExtractIf to have some way for its Debug impl (which takes &amp;self) to call a FnMut closure, if this is even possible.

- Add `T: Debug` bounds (or `K`/`V`), even on Debug impls that do not currently make use of them, but might in the future. **Breaking change.** Must backport into Rust 1.87 (current beta) or do a de-stabilization PR in beta to delay those types by one release.

- Render using `debug_struct` + `finish_non_exhaustive`, instead of `debug_tuple`.

- Do not render the _entire_ underlying collection.

- Show a "peek" field indicating the current position of the iterator.
bors added a commit to rust-lang-ci/rust that referenced this pull request May 5, 2025
…llaumeGomez

Rollup of 11 pull requests

Successful merges:

 - rust-lang#139764 (Consistent trait bounds for ExtractIf Debug impls)
 - rust-lang#140035 (Implement RFC 3503: frontmatters)
 - rust-lang#140080 (mir-opt: Use one MirPatch in MatchBranchSimplification)
 - rust-lang#140115 (mir-opt: execute MatchBranchSimplification after GVN)
 - rust-lang#140357 (bypass linker configuration and cross target check on `x check`)
 - rust-lang#140374 (Resolve instance for SymFn in global/naked asm)
 - rust-lang#140393 (std: get rid of `sys_common::process`)
 - rust-lang#140532 (Fix RustAnalyzer discovery of rustc's `stable_mir` crate)
 - rust-lang#140559 (Removing rustc_type_ir in the rustc_infer codebase)
 - rust-lang#140636 (implement `PanicTracker` to track `t` panics)
 - rust-lang#140661 (Make `-Zfixed-x18` into a target modifier)

r? `@ghost`
`@rustbot` modify labels: rollup
@jieyouxu
Copy link
Member

jieyouxu commented May 5, 2025

rustdoc-js-std test failed in rollup: #140674 (comment)

Testing parser-weird-queries.js ... OK
Testing path-end-empty.js ... OK
Testing path-maxeditdistance.js ... FAILED
[ query `vec::iter`]==> Exact check failed at position 3: expected '{"path":"std::vec::Drain","name":"into_iter"}' but found '{"parent":{"ty":5,"name":"ExtractIf","path":"std::vec","exactPath":"alloc::vec::extract_if","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"dist":2,"path_dist":0,"index":4,"desc":"","item":{"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9127,"len":1625,"promise":{}},"descIndex":1588,"exactPath":"alloc::vec::extract_if","parent":{"ty":5,"name":"ExtractIf","path":"std::vec","exactPath":"alloc::vec::extract_if","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"paramNames":["I"],"id":73052,"word":"into_iter","normalizedName":"intoiter","bitIndex":25520,"implDisambiguator":null},"displayPath":"<span>std::</span><span>vec::</span><span>ExtractIf::</span>","fullPath":"alloc::vec::extract_if::ExtractIf::into_iter|13","href":"../std/vec/struct.ExtractIf.html#method.into_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9127,"len":1625,"promise":{}},"descIndex":1588,"exactPath":"alloc::vec::extract_if","paramNames":["I"],"id":73052,"word":"into_iter","normalizedName":"intoiter","bitIndex":25520,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 3: expected '{"path":"std::vec::IntoIter","name":"into_iter"}' but found '{"parent":{"ty":5,"name":"Drain","path":"std::vec","exactPath":"alloc::vec::drain","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"dist":2,"path_dist":0,"index":4,"desc":"","item":{"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9127,"len":1625,"promise":{}},"descIndex":1588,"exactPath":"alloc::vec::drain","parent":{"ty":5,"name":"Drain","path":"std::vec","exactPath":"alloc::vec::drain","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"paramNames":["I"],"id":73053,"word":"into_iter","normalizedName":"intoiter","bitIndex":25521,"implDisambiguator":null},"displayPath":"<span>std::</span><span>vec::</span><span>Drain::</span>","fullPath":"alloc::vec::drain::Drain::into_iter|13","href":"../std/vec/struct.Drain.html#method.into_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9127,"len":1625,"promise":{}},"descIndex":1588,"exactPath":"alloc::vec::drain","paramNames":["I"],"id":73053,"word":"into_iter","normalizedName":"intoiter","bitIndex":25521,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::vec::Splice","name":"into_iter"}' but found '{"parent":{"ty":5,"name":"Splice","path":"std::vec","exactPath":"alloc::vec::splice","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"dist":2,"path_dist":0,"index":4,"desc":"","item":{"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9127,"len":1625,"promise":{}},"descIndex":1589,"exactPath":"alloc::vec::splice","parent":{"ty":5,"name":"Splice","path":"std::vec","exactPath":"alloc::vec::splice","unboxFlag":false},"type":{"inputs":[],"output":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"where_clause":[[]]},"paramNames":["I"],"id":73058,"word":"into_iter","normalizedName":"intoiter","bitIndex":25526,"implDisambiguator":null},"displayPath":"<span>std::</span><span>vec::</span><span>Splice::</span>","fullPath":"alloc::vec::splice::Splice::into_iter|13","href":"../std/vec/struct.Splice.html#method.into_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"into_iter","path":"std::vec","descShard":{"crate":"std","shard":4,"start":9127,"len":1625,"promise":{}},"descIndex":1589,"exactPath":"alloc::vec::splice","paramNames":["I"],"id":73058,"word":"into_iter","normalizedName":"intoiter","bitIndex":25526,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::collections::VecDeque","name":"iter"}' but found '{"parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":11,"name":"reference","ty":1,"path":null,"exactPath":null,"generics":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"bindings":{},"unboxFlag":true}],"output":[{"id":67,"name":"Iter","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::iter","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"dist":0,"path_dist":1,"index":0,"desc":"Returns a front-to-back iterator.","item":{"crate":"std","ty":13,"name":"iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1530,"exactPath":"alloc::collections::vec_deque","parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":11,"name":"reference","ty":1,"path":null,"exactPath":null,"generics":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"bindings":{},"unboxFlag":true}],"output":[{"id":67,"name":"Iter","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::iter","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"paramNames":["T","A"],"id":55732,"word":"iter","normalizedName":"iter","bitIndex":8200,"implDisambiguator":null},"displayPath":"<span>std::</span><span>collections::</span><span>VecDeque::</span>","fullPath":"alloc::collections::vec_deque::VecDeque::iter|13","href":"../std/collections/struct.VecDeque.html#method.iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1530,"exactPath":"alloc::collections::vec_deque","paramNames":["T","A"],"id":55732,"word":"iter","normalizedName":"iter","bitIndex":8200,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::collections::VecDeque","name":"iter_mut"}' but found '{"parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":11,"name":"reference","ty":1,"path":null,"exactPath":null,"generics":[{"id":22,"name":"mut","ty":0,"path":"std","exactPath":"std","generics":[],"bindings":{},"unboxFlag":false},{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"bindings":{},"unboxFlag":true}],"output":[{"id":66,"name":"IterMut","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::iter_mut","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"dist":2,"path_dist":1,"index":0,"desc":"Returns a front-to-back iterator that returns mutable …","item":{"crate":"std","ty":13,"name":"iter_mut","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1534,"exactPath":"alloc::collections::vec_deque","parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":11,"name":"reference","ty":1,"path":null,"exactPath":null,"generics":[{"id":22,"name":"mut","ty":0,"path":"std","exactPath":"std","generics":[],"bindings":{},"unboxFlag":false},{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"bindings":{},"unboxFlag":true}],"output":[{"id":66,"name":"IterMut","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::iter_mut","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"paramNames":["T","A"],"id":55736,"word":"iter_mut","normalizedName":"itermut","bitIndex":8204,"implDisambiguator":null},"displayPath":"<span>std::</span><span>collections::</span><span>VecDeque::</span>","fullPath":"alloc::collections::vec_deque::VecDeque::iter_mut|13","href":"../std/collections/struct.VecDeque.html#method.iter_mut","displayTypeSignature":null,"crate":"std","ty":13,"name":"iter_mut","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1534,"exactPath":"alloc::collections::vec_deque","paramNames":["T","A"],"id":55736,"word":"iter_mut","normalizedName":"itermut","bitIndex":8204,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::collections::VecDeque","name":"from_iter"}' but found '{"parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"output":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":50,"name":"IntoIterator","ty":10,"path":"std::iter","exactPath":"core::iter::traits::collect","generics":[],"bindings":{},"unboxFlag":false}]]},"dist":2,"path_dist":1,"index":4,"desc":"","item":{"crate":"std","ty":13,"name":"from_iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1455,"exactPath":"alloc::collections::vec_deque","parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"output":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":50,"name":"IntoIterator","ty":10,"path":"std::iter","exactPath":"core::iter::traits::collect","generics":[],"bindings":{},"unboxFlag":false}]]},"paramNames":["T","I"],"id":55638,"word":"from_iter","normalizedName":"fromiter","bitIndex":8106,"implDisambiguator":null},"displayPath":"<span>std::</span><span>collections::</span><span>VecDeque::</span>","fullPath":"alloc::collections::vec_deque::VecDeque::from_iter|13","href":"../std/collections/struct.VecDeque.html#method.from_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"from_iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1455,"exactPath":"alloc::collections::vec_deque","paramNames":["T","I"],"id":55638,"word":"from_iter","normalizedName":"fromiter","bitIndex":8106,"implDisambiguator":null}'
[ query `vec::iter`]==> Exact check failed at position 4: expected '{"path":"std::collections::VecDeque","name":"into_iter"}' but found '{"parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"output":[{"id":65,"name":"IntoIter","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::into_iter","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"dist":2,"path_dist":1,"index":4,"desc":"Consumes the deque into a front-to-back iterator yielding …","item":{"crate":"std","ty":13,"name":"into_iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1503,"exactPath":"alloc::collections::vec_deque","parent":{"ty":5,"name":"VecDeque","path":"std::collections","exactPath":"alloc::collections::vec_deque","unboxFlag":false},"type":{"inputs":[{"id":132,"name":"VecDeque","ty":5,"path":"std::collections","exactPath":"alloc::collections::vec_deque","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"output":[{"id":65,"name":"IntoIter","ty":5,"path":"std::collections::vec_deque","exactPath":"alloc::collections::vec_deque::into_iter","generics":[{"id":-1,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true},{"id":-2,"name":"","ty":26,"path":null,"exactPath":null,"generics":[],"bindings":{},"unboxFlag":true}],"bindings":{},"unboxFlag":false}],"where_clause":[[],[{"id":18,"name":"Allocator","ty":10,"path":"std::alloc","exactPath":"core::alloc","generics":[],"bindings":{},"unboxFlag":false}]]},"paramNames":["T","A"],"id":55703,"word":"into_iter","normalizedName":"intoiter","bitIndex":8171,"implDisambiguator":"impl-IntoIterator-for-VecDeque%3CT,+A%3E"},"displayPath":"<span>std::</span><span>collections::</span><span>VecDeque::</span>","fullPath":"alloc::collections::vec_deque::VecDeque::into_iter|13","href":"../std/collections/struct.VecDeque.html#impl-IntoIterator-for-VecDeque%3CT,+A%3E/method.into_iter","displayTypeSignature":null,"crate":"std","ty":13,"name":"into_iter","path":"std::collections","descShard":{"crate":"std","shard":1,"start":2110,"len":2423,"promise":{}},"descIndex":1503,"exactPath":"alloc::collections::vec_deque","paramNames":["T","A"],"id":55703,"word":"into_iter","normalizedName":"intoiter","bitIndex":8171,"implDisambiguator":"impl-IntoIterator-for-VecDeque%3CT,+A%3E"}'
Testing path-ordering.js ... OK

@bors r-

@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 May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug impls of ExtractIf have inconsistent trait bounds
8 participants