Add dedicated error message for pointer to reference
diff --git a/syntax/check.rs b/syntax/check.rs
index c76ef19..eba6565 100644
--- a/syntax/check.rs
+++ b/syntax/check.rs
@@ -235,7 +235,11 @@
 
 fn check_type_ptr(cx: &mut Check, ty: &Ptr) {
     match ty.inner {
-        Type::Ref(_) | Type::Ptr(_) | Type::Fn(_) | Type::Void(_) => {}
+        Type::Ptr(_) | Type::Fn(_) | Type::Void(_) => {}
+        Type::Ref(_) => {
+            cx.error(ty, "C++ does not allow pointer to reference as a type");
+            return;
+        }
         _ => return,
     }