summaryrefslogtreecommitdiffstats
path: root/src/etc/rust_types.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/rust_types.py')
-rw-r--r--src/etc/rust_types.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/etc/rust_types.py b/src/etc/rust_types.py
index bbc945a7d..bf512bc99 100644
--- a/src/etc/rust_types.py
+++ b/src/etc/rust_types.py
@@ -31,6 +31,7 @@ class RustType(object):
STD_REF = "StdRef"
STD_REF_MUT = "StdRefMut"
STD_REF_CELL = "StdRefCell"
+ STD_NONZERO_NUMBER = "StdNonZeroNumber"
STD_STRING_REGEX = re.compile(r"^(alloc::(\w+::)+)String$")
@@ -49,6 +50,7 @@ STD_CELL_REGEX = re.compile(r"^(core::(\w+::)+)Cell<.+>$")
STD_REF_REGEX = re.compile(r"^(core::(\w+::)+)Ref<.+>$")
STD_REF_MUT_REGEX = re.compile(r"^(core::(\w+::)+)RefMut<.+>$")
STD_REF_CELL_REGEX = re.compile(r"^(core::(\w+::)+)RefCell<.+>$")
+STD_NONZERO_NUMBER_REGEX = re.compile(r"^core::num::([a-z_]+::)*NonZero.+$")
TUPLE_ITEM_REGEX = re.compile(r"__\d+$")
@@ -72,6 +74,7 @@ STD_TYPE_TO_REGEX = {
RustType.STD_REF_MUT: STD_REF_MUT_REGEX,
RustType.STD_REF_CELL: STD_REF_CELL_REGEX,
RustType.STD_CELL: STD_CELL_REGEX,
+ RustType.STD_NONZERO_NUMBER: STD_NONZERO_NUMBER_REGEX,
}
def is_tuple_fields(fields):