Commit fe4b51c
authored
`clippy::approx_constant` is denied-by-default; the five `3.14` literals
in lib/common test asserts (math.rs:268, string.rs:300, types.rs:297,
types.rs:304) were tripping it and causing `cargo clippy -p my-lang
--lib --tests --no-deps` to exit non-zero, which is a CI gate hazard
for any future `-D warnings` rollout.
None of the affected sites were testing pi specifically -- the literal
was incidental. Swapping to `2.5` keeps the tests round-trip-clean
(parses to itself, formats to itself, exact in IEEE-754) without
approximating any well-known constant.
Verified with `cargo test -p my-lang --lib library::common::` (39/39
pass, including the four affected tests). The wider lib test suite is
not runnable on clean main yet -- it crashes with STATUS_STACK_BUFFER_OVERRUN
on the depth-overflow tests fixed in #21, which is why this PR scopes
verification to the affected module.
Part 1 of 4 from #22.
1 parent e0e6b6b commit fe4b51c
3 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
0 commit comments