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, & format ! ( "unsupported type: {}" , ident) ) ;
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 @@ -21,6 +21,7 @@ pub static ERRORS: &[Error] = &[
21
21
DISCRIMINANT_OVERFLOW ,
22
22
DOUBLE_UNDERSCORE ,
23
23
RUST_TYPE_BY_VALUE ,
24
+ UNSUPPORTED_TYPE ,
24
25
USE_NOT_ALLOWED ,
25
26
] ;
26
27
@@ -66,6 +67,12 @@ pub static RUST_TYPE_BY_VALUE: Error = Error {
66
67
note : Some ( "hint: wrap it in a Box<>" ) ,
67
68
} ;
68
69
70
+ pub static UNSUPPORTED_TYPE : Error = Error {
71
+ msg : "unsupported type: " ,
72
+ label : Some ( "unsupported type" ) ,
73
+ note : None ,
74
+ } ;
75
+
69
76
pub static USE_NOT_ALLOWED : Error = Error {
70
77
msg : "`use` items are not allowed within cxx bridge" ,
71
78
label : Some ( "not allowed" ) ,
You can’t perform that action at this time.
0 commit comments