Judgment check_trait_manually_implementable
judgment_fn! {
/// Validate that the trait can be implemented by hand. `Sized` can't (rustc's E0322).
fn check_trait_manually_implementable(
trait_id: TraitId,
) => () {
/* rules omitted */
}
}
Source: crates/formality-rust/src/check/impls.rs:76
The number on each rule’s conclusion is positive coverage; the number on each premise is negative coverage. Click a number to browse the tests.
Sized| Line | Coverage | Source |
|---|---|---|
| 84 | ✗ | (if trait_id.is_sized()) |
| 85 | 2 | (fail "explicit impls for the `Sized` trait are not permitted") |
| ──────── ("Sized") | ||
| 87 | ✗ | (check_trait_manually_implementable(trait_id) => ()) |
not Sized| Line | Coverage | Source |
|---|---|---|
| 91 | ✗ | (if !trait_id.is_sized()) |
| ──────── ("not Sized") | ||
| 93 | 327 | (check_trait_manually_implementable(trait_id) => ()) |