Parse negative impls
diff --git a/syntax/check.rs b/syntax/check.rs
index 15e19b8..2ebbf05 100644
--- a/syntax/check.rs
+++ b/syntax/check.rs
@@ -402,7 +402,15 @@
}
fn check_api_impl(cx: &mut Check, imp: &Impl) {
- if let Type::UniquePtr(ty) | Type::CxxVector(ty) = &imp.ty {
+ let ty = &imp.ty;
+
+ if let Some(negative) = imp.negative_token {
+ let span = quote!(#negative #ty);
+ cx.error(span, "negative impl is not supported yet");
+ return;
+ }
+
+ if let Type::UniquePtr(ty) | Type::CxxVector(ty) = ty {
if let Type::Ident(inner) = &ty.inner {
if Atom::from(&inner.rust).is_none() {
return;