@@ -117,9 +117,9 @@ pub struct Visibility {
117117
118118#[ derive( Clone , Debug , Serialize , Deserialize , ToDebugSNode , PartialEq , Eq ) ]
119119pub enum BodyVisibility {
120+ /// Function is declared uninterpreted (i.e., "visible nowhere")
120121 Uninterpreted ,
121- /// None for pub
122- /// Some(path) means visible to path and path's descendents
122+ /// Body is visible at the given visibility.
123123 Visibility ( Visibility ) ,
124124}
125125
@@ -190,12 +190,12 @@ pub enum IntRange {
190190/// In some places, the decoration of a Typ cannot be considered meaningful due to these
191191/// implicit 'identity' coercions:
192192/// - `expr.typ`
193- /// - `place.typ`
194193/// - `pattern.typ`
195194/// - `exp.typ` (SST nodes)
196195/// But in other places, types must be exactly correct, *including* decoration:
197196/// - type arguments for a Call
198197/// - `pattern_binding.typ` (type of a local variable declaration)
198+ /// - `place.typ` (See docs for `Place`)
199199/// - Most places where `Typ` is given as an explicit field of a node
200200#[ derive(
201201 Debug ,
@@ -249,8 +249,6 @@ pub enum TypDecoration {
249249pub enum Primitive {
250250 Array ,
251251 Slice ,
252- /// StrSlice type. Currently the vstd StrSlice struct is "seen" as this type
253- /// despite the fact that it is in fact a datatype
254252 StrSlice ,
255253 Ptr , // Mut ptr, unless Const decoration is applied
256254 Global ,
@@ -353,7 +351,8 @@ pub enum ModeCoercion {
353351 /// This operation behaves like a datatype constructor with a mode annotation
354352 /// `from_mode` on its field.
355353 /// (e.g., Tracked(...) is proof -> exec, Ghost(...) is spec -> exec.
356- /// Like with ordinary constructors, the input can be spec and if so, the whole thing is spec.
354+ /// Note that `Tracked` behaves like an exec datatype with a proof-mode field, meaning
355+ /// if the input is 'spec', then the whole thing is 'spec'.
357356 Constructor ,
358357 /// This behaves like a field-getter,
359358 /// returning the contents of the Tracked or Ghost value.
@@ -574,18 +573,17 @@ pub enum BoundsCheck {
574573
575574#[ derive( Copy , Clone , Debug , Serialize , Deserialize , PartialEq , Eq , Hash , ToDebugSNode ) ]
576575pub enum OverflowBehavior {
577- /// Return an int. This is the only value allowed in SST .
576+ /// Return an unbounded int, the exact value of the arithmetic expression .
578577 Allow ,
579- /// Truncate to the given range
578+ /// Truncate to the given range.
580579 Truncate ( IntRange ) ,
581- /// Error if the result is outside the given range
580+ /// Error if the result is outside the given range.
582581 Error ( IntRange ) ,
583582}
584583
585584#[ derive( Copy , Clone , Debug , Serialize , Deserialize , PartialEq , Eq , Hash , ToDebugSNode ) ]
586585pub enum Div0Behavior {
587586 /// Return the (unspecified) result of divide- or mod-by-0.
588- /// This is the only value allowed in SST.
589587 Allow ,
590588 /// Error if the dividend is 0.
591589 Error ,
0 commit comments