generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 142
Closed
Labels
[C] Feature / EnhancementA new feature request or enhancement to an existing feature.A new feature request or enhancement to an existing feature.[E] User ExperienceAn UX enhancement for an existing feature. Including deprecation of an existing one.An UX enhancement for an existing feature. Including deprecation of an existing one.
Description
Requested feature: Implementing an Invariant can be error prone and may lead to invalid symbolic variable generation or unsound assertions.
Use case: Users implementing Invariant for their custom enums and structs.
Link to relevant documentation (Rust reference, Nomicon, RFC):
Is this a breaking change? No
struct Header {
type: Type,
size: usize,
}
unsafe impl Invariant for Header {
fn is_valid() -> bool {
type.is_valid()
}
}We should also provide an attribute to suppress the warning if some fields were left out on purpose. E.g.:
struct Header {
type: Type,
data: u128,
}
unsafe impl Invariant for Header {
#[rmc::allow_unchecked]
fn is_valid() -> bool {
type.is_valid()
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[C] Feature / EnhancementA new feature request or enhancement to an existing feature.A new feature request or enhancement to an existing feature.[E] User ExperienceAn UX enhancement for an existing feature. Including deprecation of an existing one.An UX enhancement for an existing feature. Including deprecation of an existing one.