Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Nov 6, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

GuillaumeGomez and others added 26 commits October 28, 2025 15:44
add extend_front to VecDeque with specialization like extend

ACP: rust-lang/libs-team#658
Tracking issue: #146975

_Text below was written before opening the ACP_

Feature was requested in #69939, I recently also needed it so decided to implement it as my first contribution to the Rust standard library. I plan on doing more but wanted to start with a small change.

Some questions I had (both on implementation and design) with answers:
- Q: `extend` allows iterators that yield `&T` where `T` is `Clone`, should extend_front do too?
  A: No, users can use [`copied`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.copied) and/or [`cloned`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.cloned).
- Q: Does this need a whole new trait like Extend or only a method on `VecDeque`?
  A: No, see ACP.
- Q: How do I deal with all the code duplication? Most code is similar to that of `extend`, maybe there is a nice way to factor out the code around `push_unchecked`/`push_front_unchecked`.
  Will come back to this later.
- Q: Why are certain things behind feature gates, `cfg(not(test))` like `vec::IntoIter` here and `cfg(not(no_global_oom_handling))` like `Vec::extend_from_within`? (I am also looking at implementing `VecDeque::extend_from_within`)
  A: See #146861 (review)
- Q: Should `extend_front` act like repeated pushes to the front of the queue? This reverses the order of the elements. Doing it different might incur an extra move if the iterator length is not known up front (where do you start placing elements in the buffer?).
  A: `extend_front` acts like repeated pushes, `prepend` preserves the element order, see ACP or tracking issue.
…amofek

Fix invalid tag closing when leaving expansion "original code"

Fixes #148184.

Problem was that in case an element inside the expansion's "original" element was not closed, this element would get its `pending_exit` field set to `true`, removing it when the next non-mergeable item gets pushed instead of being put inside it, and then next `exit_elem` would try to exit an empty class queue.

r? ```@notriddle```
Un-shadow object bound candidate in `NormalizesTo` goal if self_ty is trait object

Fixes rust-lang/trait-system-refactor-initiative#244

r? lcnr
run-make tests: use edition 2024

Bump run-make tests to edition 2024 to prevent test failures when using 2024 idioms in included code, such as I ran into here: #147808.
Add regression test for issue 148542

Closes #148542
Fix ICE from async closure variance

Fixes #148488

The fix is also a change from #148556
rustdoc-search: remove broken index special case

Fixes #148431
…, r=estebank

feat: Use annotate-snippets by default on nightly

This PR switches the default renderer to use `annotate-snippets` on nightly, but does not affect stable. This is part of the ongoing effort to use `annotate-snippets` to render all diagnostics.

[MCP](rust-lang/compiler-team#937)

Note: This contains the test change from #148004, without the change to the default emitter.

#59346
rust-lang/rust-project-goals#123

r? `@davidtwco`
Rollup of 7 pull requests

Successful merges:

 - #146861 (add extend_front to VecDeque with specialization like extend)
 - #148213 (Fix invalid tag closing when leaving expansion "original code")
 - #148292 (Un-shadow object bound candidate in `NormalizesTo` goal if self_ty is trait object)
 - #148528 (run-make tests: use edition 2024)
 - #148554 (Add regression test for issue 148542)
 - #148561 (Fix ICE from async closure variance)
 - #148563 (rustdoc-search: remove broken index special case)

r? `@ghost`
`@rustbot` modify labels: rollup
@pull pull bot locked and limited conversation to collaborators Nov 6, 2025
@pull pull bot added the ⤵️ pull label Nov 6, 2025
@pull pull bot merged commit c90bcb9 into relaxcn:master Nov 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants