Filter out reg_test so it doesn't prevent compiling.

This commit is contained in:
Stephen Chung 2020-04-23 13:23:25 +08:00
parent 5b41985ccc
commit a4bf572d5a
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,3 @@
use super::utils::reg_test;
use super::{reg_binary, reg_binary_mut, reg_unary}; use super::{reg_binary, reg_binary_mut, reg_unary};
use crate::def_package; use crate::def_package;
@ -49,6 +48,7 @@ def_package!(crate:LogicPackage:"Logical operators.", lib, {
reg_op!(lib, "!=", ne, INT, char, bool, ()); reg_op!(lib, "!=", ne, INT, char, bool, ());
// Special versions for strings - at least avoid copying the first string // Special versions for strings - at least avoid copying the first string
// use super::utils::reg_test;
// reg_test(lib, "<", |x: &mut String, y: String| *x < y, |v| v, map); // reg_test(lib, "<", |x: &mut String, y: String| *x < y, |v| v, map);
reg_binary_mut(lib, "<", |x: &mut String, y: String| *x < y, map); reg_binary_mut(lib, "<", |x: &mut String, y: String| *x < y, map);
reg_binary_mut(lib, "<=", |x: &mut String, y: String| *x <= y, map); reg_binary_mut(lib, "<=", |x: &mut String, y: String| *x <= y, map);

View File

@ -235,6 +235,7 @@ pub fn reg_unary_mut<T: Variant + Clone, R>(
lib.functions.insert(hash, f); lib.functions.insert(hash, f);
} }
#[cfg(not(feature = "sync"))]
pub(crate) fn reg_test<'a, A: Variant + Clone, B: Variant + Clone, X, R>( pub(crate) fn reg_test<'a, A: Variant + Clone, B: Variant + Clone, X, R>(
lib: &mut PackageStore, lib: &mut PackageStore,
fn_name: &'static str, fn_name: &'static str,