diff options
Diffstat (limited to 'ext/ffi/lib.rs')
-rw-r--r-- | ext/ffi/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs index a3cd0ebda..0541e1eeb 100644 --- a/ext/ffi/lib.rs +++ b/ext/ffi/lib.rs @@ -45,10 +45,14 @@ const _: () = { pub(crate) const MAX_SAFE_INTEGER: isize = 9007199254740991; pub(crate) const MIN_SAFE_INTEGER: isize = -9007199254740991; +pub const UNSTABLE_FEATURE_NAME: &str = "ffi"; + fn check_unstable(state: &OpState, api_name: &str) { + // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit` + // once we phase out `check_or_exit_with_legacy_fallback` state .feature_checker - .check_legacy_unstable_or_exit(api_name); + .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, api_name) } pub trait FfiPermissions { |