← Back to Pull requests

Make docblock `<code>` elements inline so they behave better #163623

Merged
GuillaumeGomez merged 3 files (105 lines) on Nov 01, 2026 07:45 UTC
View on GitHub
GuillaumeGomez GuillaumeGomez commented on Oct 01, 2026 20:53 UTC
Author

Fixes rust-lang/rust#133075.

Whole problem description is in https://github.com/rust-lang/rust/issues/133075 with nice screenshots so not going to duplicate its content here (although I'll add review comments on my PR to help the review :wink: ).

r? @lolbinarycat

Diff: 105 lines (+104 / -1) across 3 files Reviewer: GuillaumeGomez Review duration: 43852m
All Vouch review confidence checks passed
Residual risk 0.09 = Change Risk (0.48) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 105 lines diff across 3 files
0.48
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 5 substantive comment(s)
0.89
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
81%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.279
Self Review self_review
0.140
Real PR Conversation Timeline
7 items
rustbot rustbot commented on Oct 01, 2026 20:53 UTC
Contributor

Some changes occurred in HTML/CSS/JS.

cc @lolbinarycat

GuillaumeGomez GuillaumeGomez commented on code on Oct 01, 2026 20:54 UTC
Code Review
src/librustdoc/html/static/css/rustdoc.css:1
@@ -499,6 +499,9 @@ code, pre, .code-header, .type-signature {
 	border-radius: 3px;
 	padding: 0 0.125em;
 }
+.docblock code {
+	padding: 2px 0.125em;

Difference between inline-block and inline is that the box-sizing: border-box; isn't taken into account anymore, so we lose ~4px in height (a GUI test failed because of that, yeay person who wrote it!). So to compensate, I added the 2px padding on top and bottom.

View changes since the review

GuillaumeGomez GuillaumeGomez commented on code on Oct 01, 2026 20:55 UTC
Code Review
tests/rustdoc-gui/code-in-docblock-and-comma.goml:1
@@ -0,0 +1,93 @@
+// This test ensures that `<code>` in docblocks are `display: inline` so comma are

Hopefully the comments in this file makes sense as I tried to explain how I tested this behaviour.

View changes since the review

GuillaumeGomez GuillaumeGomez commented on Oct 23, 2026 09:20 UTC
Author

r? @notriddle

notriddle notriddle commented on Nov 01, 2026 00:46 UTC
Contributor

@bors r+ rollup

rust-bors[bot] rust-bors[bot] commented on Nov 01, 2026 00:46 UTC
Bot

:pushpin: Commit a041b11a170d2d8f1724f47b8e5109b01f20e80d has been approved by notriddle

It is now in the queue for this repository.

Assignees
GuillaumeGomez GuillaumeGomez
Labels
risk: low confidence: 81.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 47.8% (MEDIUM) · Higher = larger blast radius
47.8%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 81.8% · Lower = rushed or shallow review
81.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 8.7% · Safe to merge
8.7%
Repository