Skip to content

Commit

Permalink
const-ify cover (#2867)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jswrenn authored Nov 9, 2023
1 parent 70a7c6b commit 0f736c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/kani/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ pub const fn assert(cond: bool, msg: &'static str) {
///
#[inline(never)]
#[rustc_diagnostic_item = "KaniCover"]
pub fn cover(_cond: bool, _msg: &'static str) {}
pub const fn cover(_cond: bool, _msg: &'static str) {}

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

0 comments on commit 0f736c8

Please sign in to comment.