Reject `Some` without parentheses when implicit_some is enabled #655
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 224 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.324
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #655"
general
weight: 0.35
juntyr
implicit_somedrops aSomethat is not followed by(deserialize_optioninsrc/de/mod.rsconsumesSomeand the whitespace after it before checking for(. Withoutimplicit_somea missing(falls through toExpectedOption, but with the extension it falls through to the implicitSomebranch instead, so the consumedSomeis silently discarded and whatever follows is read as the inner value. Any document can enable the extension itself, so this is accepted:The grammar requires
Some, ws,(, the serializer never writes this form, and the same input without the extension is rejected withExpectedOption.A
Somethat is not followed by(now returnsExpectedOptionat the same position with or withoutimplicit_some. Restoring the cursor to beforeSomeinstead would not work fordeserialize_any(e.g.Option<Value>), which would see the sameSomeagain and recurse through the implicit branch until the recursion limit. The new test intests/367_implicit_some.rsfails on master and passes with the fix.cargo hack test --feature-powersetpasses apart from the timing test intests/607_quadratic_float_parsing.rs, which also fails on master locally, andcargo +1.64.0 hack clippy --feature-powerset --no-dev-depsis clean with the minimal-versions lockfile.CHANGELOG.md