Skip to content

don't empty the vec in evaluate_goal_steps#158126

Draft
WaffleLapkin wants to merge 2 commits into
rust-lang:mainfrom
WaffleLapkin:vec_extractor_fun
Draft

don't empty the vec in evaluate_goal_steps#158126
WaffleLapkin wants to merge 2 commits into
rust-lang:mainfrom
WaffleLapkin:vec_extractor_fun

Conversation

@WaffleLapkin

Copy link
Copy Markdown
Member

No description provided.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 19, 2026
@WaffleLapkin

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 19, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 19, 2026
don't empty the vec in `evaluate_goal_steps`
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling nix v0.30.1
warning: method `keep` is never used
   --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:135:12
    |
126 | impl<'e, 'a, T> Entry<'e, 'a, T> {
    | -------------------------------- method in this implementation
...
135 |     pub fn keep(self) { /* drop is equivalent to keeping */
    |            ^^^^
    |
    = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default

warning: associated function `from_mut` is never used
  --> compiler/rustc_next_trait_solver/src/vec_extractor/raw_slice.rs:73:18
   |
23 | impl<'a, T> RawSliceIter<'a, T> {
   | ------------------------------- associated function in this implementation
...
73 |     pub const fn from_mut(slice: &'a mut [T]) -> Self {
   |                  ^^^^^^^^

warning: method `post_inc_start` is never used
   --> compiler/rustc_next_trait_solver/src/vec_extractor/raw_slice.rs:150:15
    |
---

warning: unreachable `pub` item
  --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:11:1
   |
11 | pub struct Extractor<'e, T: 'e> {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates
   = note: requested on the command line with `-W unreachable-pub`

warning: outlives requirements can be inferred
  --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:11:27
   |
11 | pub struct Extractor<'e, T: 'e> {
   |                           ^^^^ help: remove this bound
   |
   = note: `-W explicit-outlives-requirements` implied by `-W rust-2018-idioms`
   = help: to override `-W rust-2018-idioms` add `#[allow(explicit_outlives_requirements)]`

warning: unreachable `pub` item
  --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:57:1
   |
57 | pub struct Entry<'e, 'a, T> {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:75:1
   |
75 | pub struct Hole<'e, 'a, T> {
   | ---^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:82:5
   |
82 |     pub fn new(v: &'e mut Vec<T>) -> Self {
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
   --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:109:5
    |
109 |     pub fn entry(&mut self) -> Option<Entry<'e, '_, T>> {
    |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
   --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:118:5
---

warning: unreachable `pub` item
   --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:127:5
    |
127 |     pub fn take(self) -> (T, Hole<'e, 'a, T>) {
    |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
   --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:135:5
    |
135 |     pub fn keep(self) { /* drop is equivalent to keeping */
    |     ---^^^^^^^^^^^^^^
    |     |
    |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
   --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:147:5
    |
147 |     pub fn fill(self, val: T) -> Entry<'e, 'a, T> {
    |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
 --> compiler/rustc_next_trait_solver/src/vec_extractor/raw_slice.rs:8:1
---

warning: unreachable `pub` item
  --> compiler/rustc_next_trait_solver/src/vec_extractor/raw_slice.rs:61:5
   |
61 |     pub const fn from_ref(slice: &'a [T]) -> Self {
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(super)`

warning: unreachable `pub` item
  --> compiler/rustc_next_trait_solver/src/vec_extractor/raw_slice.rs:73:5
   |
73 |     pub const fn from_mut(slice: &'a mut [T]) -> Self {
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(super)`

warning: unreachable `pub` item
  --> compiler/rustc_next_trait_solver/src/vec_extractor/raw_slice.rs:87:5

@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 940ed37 (940ed3712bf2ac6ce1b5e54c09127373aaf85517)
Base parent: 8e15021 (8e150217bafcaaaa0c45bf685c55fd56cec48598)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (940ed37): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

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

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (primary 0.4%, secondary 2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.5% [1.3%, 1.7%] 2
Regressions ❌
(secondary)
2.4% [2.3%, 2.5%] 2
Improvements ✅
(primary)
-1.8% [-1.8%, -1.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [-1.8%, 1.7%] 3

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 481.812s -> 482.089s (0.06%)
Artifact size: 390.71 MiB -> 391.22 MiB (0.13%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler 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.

4 participants