Skip to content

Commit 0f736c8

Browse files
authored
const-ify cover (rust-lang#2867)
This allows `kani::cover` to be used in the body of const fns under verification. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
1 parent 70a7c6b commit 0f736c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/kani/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub const fn assert(cond: bool, msg: &'static str) {
146146
///
147147
#[inline(never)]
148148
#[rustc_diagnostic_item = "KaniCover"]
149-
pub fn cover(_cond: bool, _msg: &'static str) {}
149+
pub const fn cover(_cond: bool, _msg: &'static str) {}
150150

151151
/// This creates an symbolic *valid* value of type `T`. You can assign the return value of this
152152
/// function to a variable that you want to make symbolic.

0 commit comments

Comments
 (0)