@@ -42,7 +42,6 @@ macro_rules! kani_lib {
4242 pub use kani_core:: * ;
4343 kani_core:: kani_intrinsics!( core) ;
4444 kani_core:: generate_arbitrary!( core) ;
45- kani_core:: check_intrinsic!( ) ;
4645
4746 pub mod mem {
4847 kani_core:: kani_mem!( core) ;
@@ -59,10 +58,6 @@ macro_rules! kani_lib {
5958 kani_core:: kani_intrinsics!( std) ;
6059 kani_core:: generate_arbitrary!( std) ;
6160
62- kani_core:: check_intrinsic! {
63- msg="This API will be made private in future releases." , vis=pub
64- }
65-
6661 pub mod mem {
6762 kani_core:: kani_mem!( std) ;
6863 }
@@ -462,51 +457,35 @@ macro_rules! kani_intrinsics {
462457
463458 /// Stub the body with its contract.
464459 pub const REPLACE : Mode = 3 ;
465- }
466- } ;
467- }
468460
469- #[ macro_export]
470- macro_rules! check_intrinsic {
471- ( $( msg=$msg: literal, vis=$vis: vis) ?) => {
472- /// Creates a non-fatal property with the specified condition and message.
473- ///
474- /// This check will not impact the program control flow even when it fails.
475- ///
476- /// # Example:
477- ///
478- /// ```no_run
479- /// let x: bool = kani::any();
480- /// let y = !x;
481- /// kani::check(x || y, "ORing a boolean variable with its negation must be true");
482- /// kani::check(x == y, "A boolean variable is always different than its negation");
483- /// kani::cover!(true, "This should still be reachable");
484- /// ```
485- ///
486- /// # Deprecated
487- ///
488- /// This function was meant to be internal only, and it was added to Kani's public interface
489- /// by mistake. Thus, it will be made private in future releases.
490- /// Instead, we recommend users to either use `assert` or `cover` to create properties they
491- /// would like to verify.
492- ///
493- /// See <https://github.com/model-checking/kani/issues/3561> for more details.
494- #[ cfg( not( feature = "concrete_playback" ) ) ]
495- #[ inline( never) ]
496- #[ rustc_diagnostic_item = "KaniCheck" ]
497- // TODO: Remove the `#![allow(deprecated)]` inside kani's crate once this is made private.
498- $( #[ deprecated( since="0.55.0" , note=$msg) ] ) ?
499- $( $vis) ? const fn check( cond: bool , msg: & ' static str ) {
500- let _ = cond;
501- let _ = msg;
502- }
461+ /// Creates a non-fatal property with the specified condition and message.
462+ ///
463+ /// This check will not impact the program control flow even when it fails.
464+ ///
465+ /// # Example:
466+ ///
467+ /// ```no_run
468+ /// let x: bool = kani::any();
469+ /// let y = !x;
470+ /// kani::check(x || y, "ORing a boolean variable with its negation must be true");
471+ /// kani::check(x == y, "A boolean variable is always different than its negation");
472+ /// kani::cover!(true, "This should still be reachable");
473+ /// ```
474+ ///
475+ #[ cfg( not( feature = "concrete_playback" ) ) ]
476+ #[ inline( never) ]
477+ #[ rustc_diagnostic_item = "KaniCheck" ]
478+ pub ( crate ) const fn check( cond: bool , msg: & ' static str ) {
479+ let _ = cond;
480+ let _ = msg;
481+ }
503482
504- #[ cfg( feature = "concrete_playback" ) ]
505- #[ inline( never) ]
506- #[ rustc_diagnostic_item = "KaniCheck" ]
507- $ ( # [ deprecated ( since= "0.55.0" , note=$ msg) ] ) ?
508- $ ( $vis ) ? const fn check ( cond: bool , msg: & ' static str ) {
509- assert! ( cond , "{}" , msg ) ;
483+ #[ cfg( feature = "concrete_playback" ) ]
484+ #[ inline( never) ]
485+ #[ rustc_diagnostic_item = "KaniCheck" ]
486+ pub ( crate ) const fn check ( cond : bool , msg: & ' static str ) {
487+ assert! ( cond, "{}" , msg) ;
488+ }
510489 }
511490 } ;
512491}
0 commit comments