Repository navigation
refactor(linter/unicorn/prefer-bigint-literals): unwrap raw field of NumericLiteral - #29914
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Merging this PR will not alter performance
Comparing Footnotes
|
Merge activity
|
…f `NumericLiteral` (#29914) The linter only runs on ASTs produced by the parser, which always sets `raw` on `NumericLiteral`s. `prefer-bigint-literals` handled `raw` being `None` anyway, with a `debug_assert!` and a fallback to the source text of the literal's span. Just `unwrap` instead. The fallback was useless anyway - `integer_literal_loses_precision`, called immediately after, already unwraps `raw`.
49f7cbb to
71133d9
Compare

The linter only runs on ASTs produced by the parser, which always sets
rawonNumericLiterals.prefer-bigint-literalshandledrawbeingNoneanyway, with adebug_assert!and a fallback to the source text of the literal's span.Just
unwrapinstead. The fallback was useless anyway -integer_literal_loses_precision, called immediately after, already unwrapsraw.