You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
some fixes to the vstd-importing special case options
* always set the VSTD_KIND environment variable from the verus binary;
this fixes --no-vstd from the command line
* introduce --is-stdlib-outside-of-core
Copy file name to clipboardExpand all lines: source/builtin_macros/src/lib.rs
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -169,6 +169,8 @@ enum VstdKind {
169
169
Imported,
170
170
/// Embed vstd and verus_builtin as modules, necessary for verifying the `core` library.
171
171
IsCore,
172
+
/// For other crates in stdlib verification that import core
173
+
ImportedViaCore,
172
174
}
173
175
174
176
fnvstd_kind() -> VstdKind{
@@ -184,8 +186,10 @@ fn vstd_kind() -> VstdKind {
184
186
returnVstdKind::Imported;
185
187
}elseif&s == "IsCore"{
186
188
returnVstdKind::IsCore;
189
+
}elseif&s == "ImportsCore"{
190
+
returnVstdKind::ImportedViaCore;
187
191
}else{
188
-
panic!("The environment variable VSTD_KIND was set but its value is invalid. Allowed values are 'IsVstd', 'NoVstd', 'Imported', and 'IsCore'");
192
+
panic!("The environment variable VSTD_KIND was set but its value is invalid. Allowed values are 'IsVstd', 'NoVstd', 'Imported', 'IsCore', and 'ImportsCore'");
189
193
}
190
194
}
191
195
_ => {}
@@ -198,7 +202,8 @@ fn vstd_kind() -> VstdKind {
198
202
returnVstdKind::IsVstd;
199
203
}
200
204
201
-
// TODO: consider using the environment variable for these instead
205
+
// For tests, which don't go through the verus binary, we infer the mode from
0 commit comments