Split the fallible function error message
diff --git a/syntax/check.rs b/syntax/check.rs
index 80937bb..4c2fff3 100644
--- a/syntax/check.rs
+++ b/syntax/check.rs
@@ -1,5 +1,5 @@
use crate::syntax::atom::Atom::{self, *};
-use crate::syntax::{error, ident, Api, ExternFn, Ref, Ty1, Type, Types, Var};
+use crate::syntax::{error, ident, Api, ExternFn, Lang::*, Ref, Ty1, Type, Types, Var};
use proc_macro2::Ident;
use syn::{Error, Result};
@@ -69,10 +69,16 @@
errors.push(return_by_value(ty, types));
}
}
- if efn.throws {
+ if efn.throws && efn.lang == Cxx {
errors.push(Error::new_spanned(
efn,
- "fallible functions are not implemented yet",
+ "fallible C++ functions are not implemented yet",
+ ));
+ }
+ if efn.throws && efn.lang == Rust {
+ errors.push(Error::new_spanned(
+ efn,
+ "fallible Rust functions are not implemented yet",
));
}
}