Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Positive coverage: prove_wf / scalar constants are always wf

scalar constants are always wf
LineCoverageSource
──────── ("scalar constants are always wf")
761(prove_wf(_decls, env, _assumptions, Const::Scalar(_)) => Constraints::none(env))

1 test exercised this rule:


Source location: tests/well_formed_trait_ref.rs:86 (all coverage from this test)

#[test]
fn const_param() {
    FormalityTest::new(crates![crate foo {
        trait Trait1<const C> where type_of_const C is u32 {}

        struct S1 {}

        impl Trait1<u32(3)> for S1 {}

        struct S2 where S1: Trait1<u32(3)> {}
    }])
    .skip_execute()
    .ok()
}
Proof tree
… (200 of 3515 nodes shown)

How to read this page