• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 5527
91%

Build:
DEFAULT BRANCH: main
Ran 24 Jul 2026 04:02AM UTC
Jobs 1
Files 442
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jul 2026 04:01AM UTC coverage: 91.272%. Remained the same
5527

push

github

bobzhang
feat(builtin): make trait promotions explicit via extend

Enable `implicit_impl_as_method` (E0079) for the `builtin` package and make every
implicitly-promoted trait method explicit via `extend`, in a dedicated
builtin/extends.mbt shim (plus inline `extend`s for test-only types).

Policy (same as the rest of the series):
- Promote (plain `pub extend`): arithmetic/bitwise operators (Add/Sub/Mul/Div/Mod/
  Neg/BitAnd/BitOr/BitXOr/Shl/Shr), `Compare::{compare}`, `Default`,
  `ToStringView`, `Logger`, and `Show::{to_string}` for value/display types.
- Deprecate (`#deprecated(..., skip_current_package=true)` + `#doc(hidden)`):
  `Compare::{op_ge,op_gt,op_le,op_lt}`, `Eq`, `Hash`, `@debug.Debug::{to_repr}`,
  `Show::{output}` (value types), and `Show::{to_string, output}` for the
  collection/tuple types whose `impl Show` is already `#deprecated` on main.

`ToJson::{to_json}` is PROMOTED, not deprecated: `x.to_json()` has ~500 cross-
package method-syntax callers (json's own test-suite exercises `to_json` on every
builtin type), so deprecating it would break the `--deny-warn` workspace build.
It can be deprecated in a coordinated follow-up alongside those callers.

Deprecating `Hash`/`Eq`/`Show::output` fires on the (few) workspace call-sites
that used method syntax on builtin types; those are migrated to the trait form in
this PR (46 sites): `x.hash()` -> `Hash::hash(x)`, `x.hash_combine(h)` ->
`Hash::hash_combine(x, h)`, `T::equal(a, b)` -> `a == b`, `c.output(buf)` ->
`Show::output(c, buf)` -- across builtin's own tests plus bytes/uint16/tuple/
string/hashmap/internal-regex/unit test & doc files. `Compare::{op_*}` and
`@debug.Debug::{to_repr}` had zero callers.

pkg.generated.mbti: +190/-0 vs main -- only the blessed promotions
(arithmetic, `compare`, `default`, `to_string`, `to_json`) are exposed; the
deprecated ones (`op_*`, `equal`/`not_equal`, `hash`/`hash_combine`, `output`,
`to_repr`) are hidden.

Details:
- Tuple2..Tuple16 are unnameable in an `ex... (continued)

1 of 1 new or added line in 1 file covered. (100.0%)

15885 of 17404 relevant lines covered (91.27%)

189038.27 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5527.1 24 Jul 2026 04:02AM UTC 443
91.29
GitHub Action Run
Source Files on build 5527
  • Tree
  • List 442
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 501fef84 on github
  • Prev Build on main (#5523)
  • Next Build on main (#5529)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc