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

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

This comment has been minimized.

@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
@rust-bors

This comment has been minimized.

@lcnr

lcnr commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

ur only doing this in the trait solver, not in fulfill 😅 the fulfill loop is significantly hotter and with potentially more elements '^^

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
   |                 ^^^^^^^^   ------------ type must be known at this point
   |
help: consider giving `kept_end` an explicit type, where the type for type parameter `U` is specified
   |
66 |             let kept_end: NonNull<U> = slice.cast();
   |                         ++++++++++++

error[E0133]: call to unsafe function `std::ptr::copy` is unsafe and requires unsafe block
   --> compiler/rustc_next_trait_solver/src/vec_extractor.rs:123:9
    |
123 |         ptr::copy(self.rest.as_slice().as_ptr().cast(), self.kept_end.as_ptr(), rest);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior

error[E0133]: call to unsafe function `Vec::<T, A>::set_len` is unsafe and requires unsafe block

This branch has not been deployed

No deployments
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.

5 participants