You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cxx-qt-build: do not panic for cxx_gen failures instead use Result
This allows for CXX errors to appear with a span in the macro expansion
Before this change if you had a unsupported type in an invokable only
the following error would occur.
```
[build] thread 'main' panicked at 'Could not generate C++ from Rust file:
Syn(Error("unsupported type: QUrl"))', crates/cxx-qt-build/src/lib.rs:120:14
```
Now with this change we have an additional error from the macro expansion.
```
[build] error: unsupported type: QUrl
[build] --> examples/qml_minimal/rust/src/cxxqt_object.rs:57:35
[build] |
[build] 57 | pub fn test(&self, _url: &QUrl) {
[build] | ^^^^
```
Note however this does cause loads of extra errors below but this is
a side effect of the rest of the CXX macro not being expanded, this first
error is the correct one though.
Related to #38
0 commit comments