Test nonsense_rigid_const_bound
Source location: tests/consts.rs:10
#[test]
fn nonsense_rigid_const_bound() {
FormalityTest::new(crates![crate Foo {
// A fixed value is not permitted as the subject of this bound.
trait Foo where type_of_const true is u32 {}
}])
.err(expect_test::expect![[r#"
the rule "check trait" at (traits.rs) failed because
prove_where_clauses_well_formed([type_of_const true is u32])
Caused by:
type_of_const requires a universal const parameter, found true"#]])
}
Rules proved (0)
This test records no positive coverage.
Premises failed (4)
The last column links to the premise’s page when the judgment view counts this failure against that premise. It does not when the premise is read as infallible, or when the failure was blamed inside a multi-line premise that carries no record on its own first line.
| Judgment | Rule | Premise | All tests of this premise |
|---|---|---|---|
| check_all_crates | check all prefixes | for_all(i in 0..crates.len()) (let program = cra… (line 52, blamed at line 54) | not counted by the judgment view |
| check_crate | check crate | for_all(item in &c.items) (check_crate_item(prog… (line 73, blamed at line 74) | not counted by the judgment view |
| check_crate_item | trait | check_trait(program, Env::default(), v, crate_id… (line 188) | 7 tests |
| check_trait | check trait | scope(enter_universally(env, &binder.explicit_bi… (line 20, blamed at line 22) | not counted by the judgment view |
Proof trees
Failed proof tree
check_all_crates failedmod.rs:42args
rule "check all prefixes"mod.rs:54check_crate failedmod.rs:61args
rule "check crate"mod.rs:74check_crate_item failedmod.rs:179rule "trait"mod.rs:188check_trait failedtraits.rs:9rule "check trait"traits.rs:22 (failed: inapplicable)