File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ fn check_type_ident(cx: &mut Check, ident: &Ident) {
67
67
&& !cx. types . cxx . contains ( ident)
68
68
&& !cx. types . rust . contains ( ident)
69
69
{
70
- cx. error ( ident, "unsupported type" ) ;
70
+ let msg = format ! ( "unsupported type: {}" , ident) ;
71
+ cx. error ( ident, & msg) ;
71
72
}
72
73
}
73
74
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ pub static ERRORS: &[Error] = &[
22
22
DOT_INCLUDE ,
23
23
DOUBLE_UNDERSCORE ,
24
24
RUST_TYPE_BY_VALUE ,
25
+ UNSUPPORTED_TYPE ,
25
26
USE_NOT_ALLOWED ,
26
27
] ;
27
28
@@ -73,6 +74,12 @@ pub static RUST_TYPE_BY_VALUE: Error = Error {
73
74
note : Some ( "hint: wrap it in a Box<>" ) ,
74
75
} ;
75
76
77
+ pub static UNSUPPORTED_TYPE : Error = Error {
78
+ msg : "unsupported type: " ,
79
+ label : Some ( "unsupported type" ) ,
80
+ note : None ,
81
+ } ;
82
+
76
83
pub static USE_NOT_ALLOWED : Error = Error {
77
84
msg : "`use` items are not allowed within cxx bridge" ,
78
85
label : Some ( "not allowed" ) ,
You can’t perform that action at this time.
0 commit comments