Add a simple diagnostics type to the IR and use it to report type conversion
errors in the generated bindings file.
PiperOrigin-RevId: 402524203
diff --git a/rs_bindings_from_cc/ir.rs b/rs_bindings_from_cc/ir.rs
index 0d14bce..7afe5c4 100644
--- a/rs_bindings_from_cc/ir.rs
+++ b/rs_bindings_from_cc/ir.rs
@@ -102,9 +102,16 @@
}
#[derive(Debug, PartialEq, Eq, Hash, Clone, Deserialize)]
+pub struct UnsupportedItem {
+ pub name: String,
+ pub message: String,
+}
+
+#[derive(Debug, PartialEq, Eq, Hash, Clone, Deserialize)]
pub enum Item {
Func(Func),
Record(Record),
+ UnsupportedItem(UnsupportedItem),
}
#[derive(Debug, Default, PartialEq, Eq, Hash, Clone, Deserialize)]