Skip to content

[DRAFT] Cleanups related to RefDecodable - #162287

Draft
Zalathar wants to merge 7 commits into
rust-lang:mainfrom
Zalathar:ref-decodable
Draft

[DRAFT] Cleanups related to RefDecodable#162287
Zalathar wants to merge 7 commits into
rust-lang:mainfrom
Zalathar:ref-decodable

Conversation

@Zalathar

@Zalathar Zalathar commented Sep 4, 2026

Copy link
Copy Markdown
Member

(For now this is a draft to measure perf.)

For !needs_drop types, this should allow decoding directly into the
arena-allocated slice.

For needs_drop types, the arena already collects into a SmallVec<T>, so this
avoids an intermediate conversion from Vec<T> to SmallVec<T>.
- Added and expanded comments
- Renamed and clarified the impl-decodable macro
- Sorted the macro list of Decodable impls
- Moved a manual Decodable impl into the macro list
@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. labels Sep 4, 2026
@Zalathar

Zalathar commented Sep 4, 2026

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 Sep 4, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 4, 2026
[DRAFT] Cleanups related to RefDecodable
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_symbol_mangling v0.0.0 (/checkout/compiler/rustc_symbol_mangling)
warning: unresolved link to `impl_decodable_via_ref_decodable_for_local_type`
  --> compiler/rustc_middle/src/ty/codec/ref_decodable.rs:21:29
   |
21 | /// by a trait bound; see [`impl_decodable_via_ref_decodable_for_local_type`] for details.
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `impl_decodable_via_ref_decodable_for_local_type` in scope
   |
   = note: `macro_rules` named `impl_decodable_via_ref_decodable_for_local_type` exists in this crate, but it is not in scope at this link's location
   = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

@rust-bors

rust-bors Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 91fa19a (91fa19a8b0f36ffcd6920c9f080e9a0c52a09950)
Base parent: 71238e2 (71238e21fc55e73ab3aad8c9f79fed7a47a179e1)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (91fa19a): comparison URL.

Overall result: ❌✅ regressions and improvements - 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

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.2%] 4
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 1

Max RSS (memory usage)

Results (primary 2.7%, secondary 3.2%)

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

mean range count
Regressions ❌
(primary)
2.7% [2.6%, 2.7%] 2
Regressions ❌
(secondary)
3.2% [2.6%, 3.7%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.7% [2.6%, 2.7%] 2

Cycles

Results (secondary 12.3%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
29.5% [29.5%, 29.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.8% [-4.8%, -4.8%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 475.37s -> 485.156s (2.06%)
Artifact size: 403.37 MiB -> 403.54 MiB (0.04%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 4, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants