aboutsummaryrefslogtreecommitdiff
path: root/syntax/check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/check.rs')
-rw-r--r--syntax/check.rs37
1 files changed, 22 insertions, 15 deletions
diff --git a/syntax/check.rs b/syntax/check.rs
index 0770c847..b5fd45e1 100644
--- a/syntax/check.rs
+++ b/syntax/check.rs
@@ -123,9 +123,11 @@ fn check_type_rust_vec(cx: &mut Check, ty: &Ty1) {
}
match Atom::from(&ident.rust) {
- None | Some(Bool) | Some(Char) | Some(U8) | Some(U16) | Some(U32) | Some(U64)
- | Some(Usize) | Some(I8) | Some(I16) | Some(I32) | Some(I64) | Some(Isize)
- | Some(F32) | Some(F64) | Some(RustString) => return,
+ None
+ | Some(
+ Bool | Char | U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize | F32
+ | F64 | RustString,
+ ) => return,
Some(CxxString) => {}
}
}
@@ -162,10 +164,12 @@ fn check_type_shared_ptr(cx: &mut Check, ptr: &Ty1) {
}
match Atom::from(&ident.rust) {
- None | Some(Bool) | Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(Usize)
- | Some(I8) | Some(I16) | Some(I32) | Some(I64) | Some(Isize) | Some(F32)
- | Some(F64) | Some(CxxString) => return,
- Some(Char) | Some(RustString) => {}
+ None
+ | Some(
+ Bool | U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize | F32 | F64
+ | CxxString,
+ ) => return,
+ Some(Char | RustString) => {}
}
} else if let Type::CxxVector(_) = &ptr.inner {
cx.error(ptr, "std::shared_ptr<std::vector> is not supported yet");
@@ -183,10 +187,12 @@ fn check_type_weak_ptr(cx: &mut Check, ptr: &Ty1) {
}
match Atom::from(&ident.rust) {
- None | Some(Bool) | Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(Usize)
- | Some(I8) | Some(I16) | Some(I32) | Some(I64) | Some(Isize) | Some(F32)
- | Some(F64) | Some(CxxString) => return,
- Some(Char) | Some(RustString) => {}
+ None
+ | Some(
+ Bool | U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize | F32 | F64
+ | CxxString,
+ ) => return,
+ Some(Char | RustString) => {}
}
} else if let Type::CxxVector(_) = &ptr.inner {
cx.error(ptr, "std::weak_ptr<std::vector> is not supported yet");
@@ -207,11 +213,12 @@ fn check_type_cxx_vector(cx: &mut Check, ptr: &Ty1) {
}
match Atom::from(&ident.rust) {
- None | Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(Usize) | Some(I8)
- | Some(I16) | Some(I32) | Some(I64) | Some(Isize) | Some(F32) | Some(F64)
- | Some(CxxString) => return,
+ None
+ | Some(
+ U8 | U16 | U32 | U64 | Usize | I8 | I16 | I32 | I64 | Isize | F32 | F64 | CxxString,
+ ) => return,
Some(Char) => { /* todo */ }
- Some(Bool) | Some(RustString) => {}
+ Some(Bool | RustString) => {}
}
}