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

facet-rs / facet / 20024290994
58%

Build:
DEFAULT BRANCH: main
Ran 08 Dec 2025 10:09AM UTC
Jobs 1
Files 203
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

08 Dec 2025 10:08AM UTC coverage: 58.613% (+0.01%) from 58.6%
20024290994

push

github

fasterthanlime
feat: compute variance automatically from field types

This implements automatic variance computation for derived types:

- Change `Shape.variance` from `fn() -> Variance` to `fn(&'static Shape) -> Variance`
  to allow variance functions to walk type structure without capturing generics

- Add `Shape::computed_variance()` that walks struct fields, enum variants,
  and inner shapes (for Box, Vec, Option, etc.) to compute variance

- Use thread-local cycle detection to prevent stack overflow with recursive types.
  When a cycle is detected, returns `Covariant` (identity for `combine`)

- Update derive macros to use `.variance(Shape::computed_variance)`
  instead of generating per-type variance computation code

- Update `Box<T>` to use computed variance (depends on T's variance)
  instead of hardcoded `Invariant`

- Add variance tests for recursive types

Closes #1171

44 of 60 new or added lines in 3 files covered. (73.33%)

487 existing lines in 23 files now uncovered.

24730 of 42192 relevant lines covered (58.61%)

544.95 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
90.7
-0.17% facet-macros-impl/src/process_enum.rs
15
40.98
2.87% facet-core/src/types/mod.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
96.0
0.0% facet-core/src/impls_alloc/cow.rs
1
0.0
0.0% facet/src/lib.rs
2
46.43
0.0% facet-core/src/impls_camino.rs
2
93.48
0.0% facet-core/src/impls_std/hashmap.rs
2
0.0
0.0% facet-core/src/lib.rs
3
88.37
0.0% facet-core/src/impls_core/array.rs
4
0.0
0.0% facet-core/src/impls_core/ops.rs
4
92.93
0.0% facet-core/src/impls_std/hashset.rs
4
0.0
0.0% facet-core/src/impls_std/path.rs
7
9.68
0.0% facet-core/src/impls_core/tuple.rs
8
81.25
0.0% facet-core/src/impls_alloc/boxed.rs
8
46.0
0.0% facet-core/src/impls_alloc/vec.rs
8
38.33
0.0% facet-core/src/impls_core/scalar.rs
9
53.4
0.0% facet-core/src/impls_bytes.rs
9
37.68
0.0% facet-reflect/src/spanned.rs
11
67.31
0.0% facet-core/src/impls_core/pointer.rs
13
18.09
0.0% facet-core/src/impls_ordered_float.rs
17
66.15
0.0% facet-core/src/impls_jiff.rs
19
41.18
0.0% facet-core/src/impls_time.rs
30
59.76
0.0% facet-value/src/facet_impl.rs
45
35.03
0.0% facet-core/src/impls_chrono.rs
81
69.23
1.33% facet-reflect/src/peek/value.rs
199
40.98
2.87% facet-core/src/types/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 20024290994.1 08 Dec 2025 10:09AM UTC 203
58.61
GitHub Action Run
Source Files on build 20024290994
  • Tree
  • List 203
  • Changed 30
  • Source Changed 0
  • Coverage Changed 30
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d657f4b1 on github
  • Prev Build on main (#20020740731)
  • Next Build on main (#20024677191)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc