Skip to content

Commit 4724139

Browse files
committed
Deprecate deref_spec
1 parent 548e038 commit 4724139

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

vstd_extra/src/external/deref.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use vstd::prelude::*;
88
verus! {
99

1010
/// This is a workaround to add an uninterpreted specification of Deref trait, as Deref is included in Verus but does not have spec functions.
11+
/// It is currently not used, and we do not recommend using it, as it adds assumptions about the core of Rust's deref semantics, which may cause soundness issues if not used carefully.
1112
/// It may change if Verus adds native support for spec functions in the Deref trait.
1213
pub trait DerefSpec: Deref {
1314
spec fn deref_spec(&self) -> &<Self as Deref>::Target;

vstd_extra/src/external/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pub mod ilog2;
77
pub mod nonnull;
88
pub mod smart_ptr;
99

10+
#[deprecated(note = "If you can, do not use this module as it adds assumptions about the core of Rust's deref semantics.")]
1011
pub use deref::*;
1112
pub use ilog2::*;
1213
pub use nonnull::*;

0 commit comments

Comments
 (0)